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