#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;
  b += (a + c);
  cout << b * b - a * a - c * c - e * e << "\n";
  return 0;
}
