#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
int pos[maxn];
int main() {
  int a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  int all;
  int big = a + b + f;
  all = ((a + b + f) * (a + b + f) - b * b - d * d - f * f);
  cout << all << endl;
}
