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