#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 100;
double a[100];
int main() {
  for (int i = 1; i <= 6; i++) {
    cin >> a[i];
  }
  double s = 0;
  double x = a[2];
  s += x * x;
  x = a[3];
  s += x * x;
  x = a[5];
  s += x * x;
  x = a[6];
  s += x * x;
  double p = 2 * a[1] + a[2] + a[6];
  double q = a[2] + a[3];
  cout << int(p * q - s / 2.0) << endl;
  return 0;
}
