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