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