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