#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, d, e, f;
  int i = 0;
  scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f);
  a += b + f;
  c += b + d;
  e += d + f;
  i = b * b + d * d + f * f;
  printf("%d", a * a - i);
}
