#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
int main() {
  int T, i, j, k, ca = 0, m, n;
  int a[6];
  for (i = 0; i < 6; i++) scanf("%d", &a[i]);
  int d = a[0] + a[1] + a[2];
  int ans = d * d;
  ans -= a[0] * a[0] + a[2] * a[2] + a[4] * a[4];
  printf("%d\n", ans);
  return 0;
}
