#include <bits/stdc++.h>
using namespace std;
int n, a[6], ans, x, y, z, sum;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  for (int i = 0; i < 6; i++) cin >> a[i];
  cout << (a[0] + a[1] + a[2]) * (a[0] + a[1] + a[2]) - a[0] * a[0] -
              a[2] * a[2] - a[4] * a[4]
       << endl;
  return 0;
}
