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