#include <bits/stdc++.h>
using namespace std;
const int Nmax = 2e5 + 17;
inline int sqr(int x) { return x * x; }
int main(void) {
  int a[6];
  for (int i = 0; i < 6; i++) cin >> a[i];
  cout << sqr(a[0] + a[1] + a[2]) - sqr(a[0]) - sqr(a[2]) - sqr(a[4]);
}
