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