#include <bits/stdc++.h>
using namespace std;
int a[6];
int p(int x, int y) {
  int cur = x;
  for (int i = 0; i < y - 1; i++) {
    x *= cur;
  }
  return x;
}
int main() {
  for (int i = 0; i < 6; i++) cin >> a[i];
  int a1 = p(a[0] + a[1] + a[2], 2);
  int a2 = p(a[0], 2) + p(a[2], 2) + p(a[4], 2);
  cout << a1 - a2 << endl;
}
