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