#include <bits/stdc++.h>
using namespace std;
int a[7];
int main() {
  for (int i = 1; i <= 6; i++) {
    cin >> a[i];
  }
  int n;
  n = a[1] + a[2] + a[3];
  int ans = n * n - a[1] * a[1] - a[3] * a[3] - a[5] * a[5];
  cout << ans;
  return 0;
}
