#include <bits/stdc++.h>
using namespace std;
long long pw(long long b, long long p) {
  if (!p) return 1;
  long long sq = pw(b, p / 2);
  sq *= sq;
  if (p % 2) sq *= b;
  return sq;
}
long long gcd(long long a, long long b) { return (b == 0 ? a : gcd(b, a % b)); }
long long sd(long long x) { return x < 10 ? x : x % 10 + sd(x / 10); }
long long lcm(long long a, long long b) { return ((a * b) / gcd(a, b)); }
int main() {
  double a[9], area = 0;
  for (int i = 0; i < 6; ++i) cin >> a[i];
  for (int i = 0; i < 6; i += 2)
    area += 0.5 * a[i] * a[i + 1] * sin(120 * acos(-1) / 180);
  a[6] = sqrt(a[5] * a[5] + a[4] * a[4] -
              2 * a[5] * a[4] * cos(120 * acos(-1) / 180));
  a[7] = sqrt(a[2] * a[2] + a[3] * a[3] -
              2 * a[2] * a[3] * cos(120 * acos(-1) / 180));
  a[8] = sqrt(a[1] * a[1] + a[0] * a[0] -
              2 * a[1] * a[0] * cos(120 * acos(-1) / 180));
  double p = (a[6] + a[7] + a[8]) / 2;
  area += sqrt(p * (p - a[6]) * (p - a[7]) * (p - a[8]));
  cout << fixed << setprecision(0) << area / (0.5 * sin(60 * acos(-1) / 180));
}
