#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[6], t = 0, m;
  for (int i = 0; i < 6; i++) {
    cin >> a[i];
  }
  while (a[1] != 0 && a[5] != 0) {
    t = t + (2 * a[0] + 1);
    a[0]++;
    a[1]--;
    a[5]--;
  }
  t = t + 2 * a[0] * a[5] + 2 * a[0] * a[1];
  while (a[4] != 0 && a[2] != 0) {
    t = t + (2 * a[3] + 1);
    a[3]++;
    a[4]--;
    a[2]--;
  }
  cout << t;
  return 0;
}
