#include <bits/stdc++.h>
using namespace std;
int mod1 = int(1e9) + 7;
long long triangle(long long s) { return s * s; }
long long a[8];
int main() {
  for (int i = 0; i < (int)(6); ++i) cin >> a[i];
  long long s = a[0] + a[1] + a[2];
  long long tr = triangle(s);
  tr -= triangle(a[0]) + triangle(a[2]) + triangle(a[4]);
  cout << tr << endl;
  return 0;
}
