#include <bits/stdc++.h>
using namespace std;
int pow(int a) { return a * a; }
int main() {
  int a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  cout << pow(a + f + e) - (e * e) - c * c - a * a;
  return 0;
}
