#include <bits/stdc++.h>
using namespace std;
int len[7];
int sqr(int x) { return x * x; }
int main() {
  for (int i = 1; i <= 6; i++) cin >> len[i];
  cout << sqr(len[1] + len[2] + len[3]) - sqr(len[1]) - sqr(len[3]) -
              sqr(len[5])
       << endl;
  return 0;
}
