#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a[6], s1, s2, sum;
  for (int i = 0; i < 6; i++) cin >> a[i];
  sum =
      pow((a[0] + a[1] + a[2]), 2) - pow(a[0], 2) - pow(a[2], 2) - pow(a[4], 2);
  cout << sum;
}
