#include <bits/stdc++.h>
using namespace std;
int main() {
  double a, b, c, d, e, f, top, di, s1, s2, h[10];
  while (
      ~scanf("%lf%lf%lf%lf%lf%lf", &h[1], &h[2], &h[3], &h[4], &h[5], &h[6])) {
    a = h[1];
    b = h[2];
    c = h[3];
    d = h[4];
    e = h[5];
    f = h[6];
    top = b + a;
    di = c + d;
    s1 = 2 * (top * di) - a * a - d * d;
    printf("%.lf\n", s1);
  }
  return 0;
}
