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