#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)2e5 + 9;
const double pi = acos(-1);
const double eps = 1e-15;
int main() {
  int a, b, c, d, e, f;
  scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f);
  a = a + b + f;
  printf("%d\n", a * a - b * b - d * d - f * f);
  return 0;
}
