#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> v;
  for (int i = 0; i < 6; i++) {
    int num;
    cin >> num;
    v.push_back(num);
  }
  cout << (v[0] + v[1] + v[2]) * (v[0] + v[1] + v[2]) - v[0] * v[0] -
              v[2] * v[2] - v[4] * v[4]
       << endl;
  return 0;
}
