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