#include <bits/stdc++.h>
using namespace std;
const int inf = 2147483647;
inline bool cbound(int x, int b, int e) { return ((x >= b) && (x <= e)); }
inline int getint() {
  int a;
  cin >> a;
  return a;
}
inline long long getll() {
  long long a;
  cin >> a;
  return a;
}
inline double getdouble() {
  double a;
  cin >> a;
  return a;
}
int main(void) {
  vector<int> a;
  int areahex;
  for (int i = (int)(0); i < (int)(6); i++) a.push_back(getint());
  areahex = -(((a[0]) * (a[0])) + ((a[2]) * (a[2])) + ((a[4]) * (a[4]))) +
            ((a[3] + a[2] + a[4]) * (a[0] + a[1] + a[2]));
  cout << areahex << endl;
  return 0;
}
