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