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