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