#include <bits/stdc++.h>
using namespace std;
long long f(int a) { return a * a; }
int side[6];
int main() {
  for (int i = 0; i < 6; i++) cin >> side[i];
  int bt = side[0] + side[1] + side[2];
  cout << f(bt) - f(side[0]) - f(side[2]) - f(side[4]) << endl;
  return 0;
}
