#include <bits/stdc++.h>
using namespace std;
int f(int a) { return a * a; }
int main() {
  vector<int> A(6);
  for (decltype(6) i = (0); i < (6); ++i) scanf("%d", &A[i]);
  printf("%d", f(A[2] + A[3] + A[4]) - f(A[2]) - f(A[4]) - f(A[0]));
  return 0;
}
