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