#include <bits/stdc++.h>
int main() {
  int a, b, c, ans, sum1, sum2, sum;
  int s[7];
  int i;
  for (i = 1; i <= 6; i++) scanf("%d", &s[i]);
  sum1 = s[1] * s[1] + s[3] * s[3] + s[5] * s[5];
  sum2 = s[2] * s[2] + s[4] * s[4] + s[6] * s[6];
  sum = s[1] + s[2] + s[3];
  ans = sum * sum;
  ans -= s[1] * s[1];
  ans -= s[3] * s[3];
  ans -= s[5] * s[5];
  printf("%d", ans);
  return 0;
}
