#include <bits/stdc++.h>
using namespace std;
const int N = 7;
const double eps = 1e-11;
const int inf = (int)2e9;
const int mod = (int)1e9 + 7;
const double pi = 3.1415926535897932384626433832795;
template <class T>
T sqr(T n) {
  return n * n;
}
int a[N];
int main() {
  int n = 6;
  for (int i = 0; i < n; i++) {
    scanf("%d", a + i);
  }
  printf("%d\n", sqr(a[0] + a[1] + a[2]) - sqr(a[0]) - sqr(a[2]) - sqr(a[4]));
  return 0;
}
