#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, a[7], ans;
  for (int i = 1; i <= 6; ++i) cin >> a[i];
  ans = (a[1] + a[2] + a[3]) * (a[1] + a[2] + a[3]) - a[1] * a[1] -
        a[3] * a[3] - a[5] * a[5];
  cout << ans << endl;
  return 0;
}
