#include <bits/stdc++.h>
using namespace std;
int sqr(int X) { return X * X; }
int main() {
  if (fopen("input.txt", "r")) {
    freopen("input.txt", "r", stdin);
  }
  ios::sync_with_stdio(false);
  int a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  cout << sqr(a + b + c) - sqr(a) - sqr(c) - sqr(e) << endl;
}
