#include <bits/stdc++.h>
using namespace std;
static const int MAX_N = 1e6 + 5;
static const int N = 25;
static const long long Mod = 2009;
static const int inf = (1 << 30) - 1;
int cal(int x) { return x * x; }
void solve() {
  int a[6];
  for (int i = 0; i < 6; ++i) scanf("%d", &a[i]);
  printf("%d\n", cal(a[0] + a[1] + a[2]) - cal(a[0]) - cal(a[2]) - cal(a[4]));
}
int main() {
  solve();
  return 0;
}
