#include <bits/stdc++.h>
using namespace std;
int main() {
  int a1, a2, a3, a4, a5, a6;
  cin >> a1 >> a2 >> a3 >> a4 >> a5 >> a6;
  int h = a1 + a1 + 1;
  int ans = 0;
  int x = 0;
  while (x < min(a2, a6)) ans += h, h += 2, x++;
  h--;
  while (x < max(a2, a6)) ans += h, x++;
  h = a4 * 2 + 1;
  x = 0;
  while (x < min(a3, a5)) ans += h, h += 2, x++;
  cout << ans << endl;
}
