#include <bits/stdc++.h>
using namespace std;
const long long INF = (long long)3e18;
long long binpow(long long a, long long b, long long m) {
  a %= m;
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a % m;
    a = a * a % m;
    b >>= 1;
  }
  return res;
}
long long modinverse(long long a, long long m) { return binpow(a, m - 2, m); }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long a[6];
  for (long long i = 0; i < 6; i++) {
    cin >> a[i];
  }
  long long ans = (a[0] + a[1] + a[5]) * (a[0] + a[1] + a[5]) -
                  (a[1] * a[1] + a[3] * a[3] + a[5] * a[5]);
  cout << ans;
}
