#include <bits/stdc++.h>
using namespace std;
const int MAX = 1000 * 100 + 5;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  vector<int> a(6);
  for (int i = (0); i < (6); i++) cin >> a[i];
  cout << (a[0] + a[1] + a[2]) * (a[0] + a[1] + a[2]) - a[0] * a[0] -
              a[2] * a[2] - a[4] * a[4];
}
