#include <bits/stdc++.h>
using namespace std;
inline int c(int x) { return (x) * (x); }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int a[6];
  for (int i = 0; i < 6; ++i) cin >> a[i];
  cout << c(a[0] + a[1] + a[2]) - c(a[0]) - c(a[2]) - c(a[4]);
}
