#include <bits/stdc++.h>
using namespace std;
int sum = 0;
int s[10];
int main() {
  int i, j;
  cin >> s[1] >> s[2] >> s[3] >> s[4] >> s[5] >> s[6];
  sum = (s[1] + s[2] + s[3]) * (s[1] + s[2] + s[3]) - s[1] * s[1] -
        s[3] * s[3] - s[5] * s[5];
  cout << sum << endl;
  return 0;
}
