#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  long long a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  long long s0 = (a + d + c + e) * (b + c);
  long long s1 = e * e + c * c;
  long long s = s0 - s1;
  cout << s << endl;
  return 0;
}
