#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, d, e, f;
  long long sum = 0, total = 0, sum1 = 0, sum2 = 0, sum3 = 0;
  cin >> a >> b >> c >> d >> e >> f;
  sum = a + b + f;
  sum = sum * sum;
  sum1 = b * b + d * d + f * f;
  printf("%lld\n", sum - sum1);
}
