#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = numeric_limits<long long>::max();
const long long NEGINF = numeric_limits<long long>::min();
template <typename T>
void print(T t) {
  cout << t << " ";
}
template <typename T, typename... Args>
void print(T t, Args... args) {
  cout << t << " ";
  print(args...);
}
template <class T>
void print(vector<T> &list) {
  for (auto &x : list) cout << x << " ";
}
template <class T>
void read(vector<T> &list, long long n) {
  list.clear(), list.resize(n);
  for (auto &x : list) cin >> x;
}
long long len_of_number(long long n) {
  long long len(0);
  while (n != 0) {
    ++len;
    n /= 10;
  }
  return len;
}
long long sum_of_digits(long long n) {
  long long sod = 0;
  while (n != 0) {
    sod += (n % 10);
    n /= 10;
  }
  return sod;
}
bool isPalindrome(string str) {
  long long n = str.length();
  for (long long i = (0); i <= (n / 2); i++)
    if (str[i] != str[n - i - 1]) return false;
  return true;
}
long long fast_exp(long long x, long long i) {
  long long ans = 1;
  while (i > 0) {
    if (i & 1) ans = (ans * x);
    i >>= 1;
    x = (x * x);
  }
  return ans;
}
long long fast_exp(long long x, long long i, long long mod) {
  long long ans = 1;
  while (i > 0) {
    if (i & 1) ans = (ans * x) % mod;
    i >>= 1;
    x = (x * x) % mod;
  }
  return ans;
}
long long modInverse(long long x, long long mod) {
  return fast_exp(x, mod - 2, mod);
}
long long egcd_x, egcd_y, egcd_d;
void egcd(long long a, long long b) {
  if (b == 0) {
    egcd_x = 1, egcd_y = 0;
    egcd_d = a;
    return;
  }
  egcd(b, a % b);
  long long temp = egcd_x;
  egcd_x = egcd_y;
  egcd_y = temp - (a / b) * egcd_y;
}
long long extended_gcd(long long a, long long b) {
  if (a >= b) {
    egcd(a, b);
    return ((egcd_x % b) + b) % b;
  } else {
    egcd(b, a);
    return ((egcd_y % b) + b) % b;
  }
}
long long gcd(long long x, long long y) {
  long long t;
  while (y != 0) {
    t = x % y;
    x = y;
    y = t;
  }
  return x;
}
vector<long long> lp, pr;
void genPrimes(long long n) {
  lp.resize(n + 1, 0);
  long long size = 0;
  for (long long i = (2); i <= (n); i++) {
    if (!lp[i]) {
      lp[i] = i;
      pr.push_back(i);
      ++size;
    }
    for (long long j = 0; j < size && pr[j] <= lp[i] && (i * pr[j]) <= n; ++j)
      lp[i * pr[j]] = pr[j];
  }
}
bool isPrime(long long n) {
  long long root = sqrt(n);
  for (long long i = (2); i <= (root); i++)
    if (n % i == 0) return 0;
  return 1;
}
vector<long long> fact, invFact;
void genFact(long long n, long long M) {
  fact.resize(n + 1), invFact.resize(n + 1);
  fact[0] = fact[1] = invFact[0] = invFact[1] = 1;
  for (long long i = (2); i <= (n); i++) {
    fact[i] = (fact[i - 1] * i) % M;
    invFact[i] = modInverse(fact[i], M);
  }
}
long long ncr(long long n, long long r, long long M) {
  return (((fact[n] * invFact[n - r]) % M) * invFact[r] % M);
}
long long nc2(long long a) { return (a * (a - 1)) / 2; }
vector<long long> cnt;
string groupAndCnt(string str) {
  string a = "";
  long long prev_count = 0;
  char prev_char = '~';
  for (auto &c : str) {
    if (c != prev_char) {
      if (prev_count) {
        a += prev_char;
        cnt.push_back(prev_count);
      }
      prev_count = 1;
      prev_char = c;
    } else
      ++prev_count;
  }
  cnt.push_back(prev_count);
  a += prev_char;
  return a;
}
long long firstValEG(vector<long long>::iterator a,
                     vector<long long>::iterator b, long long c) {
  auto it = lower_bound(a, b, c);
  if (it == b) return -1;
  return it - a;
}
long long lastValEL(vector<long long>::iterator a,
                    vector<long long>::iterator b, long long c) {
  long long lo = 0, hi = distance(a, b) - 1, m;
  while (lo < hi) {
    m = (lo) + ((hi) - (lo) + 1) / 2;
    if (*(a + m) > c)
      hi = m - 1;
    else
      lo = m;
  }
  return ((*(a + lo)) <= c) ? lo : -1;
}
long long countInRange(vector<long long>::iterator a,
                       vector<long long>::iterator b, long long c,
                       long long d) {
  long long e = firstValEG(a, b, c);
  if (e == -1) return 0;
  return (e == -1) ? 0 : (lastValEL(a, b, d) - e + 1);
}
vector<long long> pset, pset_size;
void initSet(long long _size) {
  pset.resize(_size);
  pset_size.resize(_size);
  for (long long i = (0); i <= (_size - 1); i++) pset[i] = i, pset_size[i] = 1;
}
long long findSet(long long i) {
  return (pset[i] == i) ? i : (pset[i] = findSet(pset[i]));
}
void unionSet(long long i, long long j) {
  long long p1 = findSet(i);
  long long p2 = findSet(j);
  pset[p1] = p2;
  if (p1 != p2) {
    pset_size[p2] += pset_size[p1];
  }
}
bool isSameSet(long long i, long long j) { return findSet(i) == findSet(j); }
vector<vector<long long> > adjList;
void getEdges(long long n, long long m) {
  long long a, b;
  adjList.clear();
  adjList.resize(n + 1);
  for (long long i = (1); i <= (m); i++) {
    cin >> a >> b;
    adjList[a].push_back(b), adjList[b].push_back(a);
  }
}
void printGraph(long long a, long long b, vector<vector<long long> > &graph) {
  for (long long i = (a); i <= (b); i++) {
    print(i, ": ");
    for (auto &x : graph[i]) {
      print(x, ",");
    }
    cout << "\n";
  }
}
long double areaTriangle(long double a, long double b, long double c) {
  long double s = (a + b + c) / 2.0;
  return sqrt(s * (s - a) * (s - b) * (s - c));
}
long double areaTriangle(long double a, long double b) {
  return a * b * 0.5 * sqrt(3) * 0.5;
}
long double thirdSide(long double a, long double b) {
  return sqrt(a * a + b * b + a * b);
}
inline void solve(long long _T) {
  long long a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  long double numerator =
      areaTriangle(a, b) + areaTriangle(c, d) + areaTriangle(e, f) +
      areaTriangle(thirdSide(a, b), thirdSide(c, d), thirdSide(e, f));
  long double denominator = sqrt(3) / 4;
  long double ans = numerator / denominator;
  long long ANS;
  if (abs(ans - ceil(ans)) <= abs(ans - floor(ans))) {
    ANS = ceil(ans);
  } else {
    ANS = floor(ans);
  }
  cout << ANS;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long test_cases;
  test_cases = 1;
  for (long long T = (0); T <= (test_cases - 1); T++) {
    solve(T);
  }
  return 0;
}
