#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000009;
int q[66];
int main() {
  for (int j = 1; j <= 6; j++) scanf("%d", &q[j]);
  int sum = q[1] + q[2] + q[3];
  int ans = sum * sum;
  ans -= q[3] * q[3];
  ans -= q[5] * q[5];
  ans -= q[1] * q[1];
  cout << ans << endl;
  return 0;
}
