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