#include <bits/stdc++.h>
int main(void) {
  int x1, x2, x3, x4, x5, x6;
  int sum = 0;
  int t1, t2, i, l;
  scanf("%d %d %d %d %d %d", &x1, &x2, &x3, &x4, &x5, &x6);
  if (x2 > x6) {
    t1 = x6;
    l = x2 - x6;
  } else {
    t1 = x2;
    l = x6 - x2;
  }
  for (i = 0; i < t1; i++) {
    sum += 2 * x1 + 1;
    x1++;
  }
  sum += x1 * 2 * l;
  if (x3 > x5)
    t2 = x5;
  else
    t2 = x3;
  for (i = 0; i < t2; i++) {
    sum += 2 * x4 + 1;
    x4++;
  }
  printf("%d\n", sum);
  return 0;
}
