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