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