#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T first, T second) {
  while (second > 0) {
    first %= second;
    swap(first, second);
  }
  return first;
}
template <class _T>
inline _T sqr(const _T &first) {
  return first * first;
}
template <class _T>
inline string tostr(const _T &a) {
  ostringstream os("");
  os << a;
  return os.str();
}
const long double PI = 3.1415926535897932384626433832795L;
template <typename T>
inline void input(T &a) {
  static int ed;
  a = 0;
  while (!isdigit(ed = getchar()) && ed != '-') {
  }
  char neg = 0;
  if (ed == '-') {
    neg = 1;
    ed = getchar();
  }
  while (isdigit(ed)) {
    a = 10 * a + ed - '0';
    ed = getchar();
  }
  if (neg) a = -a;
}
template <typename T = int>
inline T nxt() {
  T res;
  input(res);
  return res;
}
mt19937 generator;
long long mod;
long long mulmod(const long long &a, const long long &b) {
  long long ratio = (long double)a * b / mod;
  long long res = a * b - ratio * mod;
  while (res < 0) {
    res += mod;
  }
  while (res >= mod) {
    res -= mod;
  }
  return res;
}
long long addmod(const long long &a, const long long &b) {
  long long res = a + b;
  while (res >= mod) {
    res -= mod;
  }
  return res;
}
void fib(long long n, long long &first, long long &second) {
  if (n == 1) {
    first = 0, second = 1;
    return;
  }
  if (n & 1ull) {
    fib(n - 1, second, first);
    second = addmod(first, second);
  } else {
    long long a, b;
    fib(n / 2, a, b);
    long long u = mulmod(a, a);
    long long v = mulmod(a, b);
    long long w = mulmod(b, b);
    first = addmod(u, w);
    second = addmod(2 * v, w);
  }
}
long long pw(long long a, long long n) {
  long long res = 1;
  while (n) {
    if (n & 1ll) {
      res = mulmod(res, a);
    }
    a = mulmod(a, a);
    n >>= 1;
  }
  return res;
}
long long pw(long long a, long long n, long long m) {
  long long res = 1;
  while (n) {
    if (n & 1ll) {
      res = res * a % m;
    }
    a = a * a % m;
    n >>= 1;
  }
  return res;
}
int main() {
  double vx = 1, vy = 0;
  double first = 0, second = 0;
  double s = 0;
  for (int i = 0; i < 6; ++i) {
    double t = nxt();
    double xx = first + vx * t;
    double yy = second + vy * t;
    s += (xx + first) * (yy - second);
    first = xx, second = yy;
    double vxx = vx * cos(PI / 3) + vy * sin(PI / 3);
    double vyy = -vx * sin(PI / 3) + vy * cos(PI / 3);
    vx = vxx;
    vy = vyy;
  }
  double ss = sqrt(3) / 2;
  cout << (long long)(-s / ss + 0.5) << "\n";
  return 0;
}
