#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[6];
  int c = 0;
  for (int i = 0; i < 6; i++) {
    scanf("%d", a + i);
  }
  int ans = a[0] + a[1] + a[2];
  ans *= ans;
  ans -= (a[0] * a[0] + a[4] * a[4] + a[2] * a[2]);
  printf("%d\n", ans);
  return 0;
}
