#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int INF = 1e9;
int main() {
  int a[6];
  int sum = 0, line;
  for (int i = 0; i < 6; i++) {
    scanf("%d", &a[i]);
  }
  line = a[0] + a[1] + a[2];
  line = line * line;
  sum = a[0] * a[0] + a[2] * a[2] + a[4] * a[4];
  printf("%d\n", line - sum);
  return 0;
}
