#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
const int inf = 0x7fffffff;
const int Min = -0x7fffffff;
int a[6];
int main() {
  for (int i = 0; i < 6; i++) {
    scanf("%d", &a[i]);
  }
  int ans = (a[0] + a[1] + a[2]) * (a[2] + a[3] + a[4]) -
            (a[0] * a[0] + a[2] * a[2] + a[4] * a[4]);
  printf("%d\n", ans);
}
