#include <bits/stdc++.h>
int X[] = {1, 0, -1, 0};
int Y[] = {0, 1, 0, -1};
using namespace std;
int main() {
  long long x[7];
  for (int i = 0; i < 6; i++) scanf("%lld", x + i + 1);
  long long a = x[1] + x[2] + x[3];
  long long ans = a * a - x[1] * x[1] - x[3] * x[3] - x[5] * x[5];
  printf("%lld\n", ans);
  return 0;
}
