#include <bits/stdc++.h>
using namespace std;
int n, i, j, k, pos, neg, tem1, tem2, m, two, one, all, unk, ual, ans;
int a, b, c, d, e, f;
char h[30], v[30];
int main() {
  scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f);
  ans = (a + b + c) * (a + b + c) - a * a - e * e - c * c;
  printf("%d\n", ans);
  return 0;
}
