#include <bits/stdc++.h>
using namespace std;
inline long long int gcd(long long int a, long long int b) {
  long long int temp;
  while (b > 0) {
    temp = b;
    b = a % b;
    a = temp;
  }
  return a;
}
inline long long int fast(long long int a, long long int b) {
  long long int prod = 1;
  while (b) {
    if (b & 1) prod = (prod * a);
    a = (a * a), b /= 2;
  }
  return prod;
}
int main() {
  int a, b, c, d, e, first;
  cin >> a >> b >> c >> d >> e >> first;
  cout << (a + b + c) * (a + b + c) - a * a - c * c - e * e;
  return 0;
}
