#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  long long x = pow(a + b + c, 2) - pow(a, 2) - pow(c, 2) - pow(e, 2);
  cout << x << endl;
}
