#include <bits/stdc++.h>
using namespace std;
long long binpow(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  long long int a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  cout << binpow((a + b + c), 2) - a * a - c * c - e * e;
  return 0;
}
