#include <bits/stdc++.h>
using namespace std;
int main() {
  double a[6];
  for (int i = 0; i < 6; i++) cin >> a[i];
  double b, c;
  b = (a[0] + a[2]) / 2 + a[1];
  c = (a[2] + a[3]) * sqrt(3) / 2;
  double res = b * c - (a[0] * a[0] + a[2] * a[2] + a[3] * a[3] + a[5] * a[5]) /
                           8 * sqrt(3);
  cout << (int)(res / sqrt(3) * 4 + 0.5) << endl;
  return 0;
}
