#include <bits/stdc++.h>
using namespace std;
const long long M = 2e5 + 102, MOD = 1e9 + 7;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int a, b, c, d, e, f, g;
  cin >> a >> b >> c >> d >> e >> f;
  cout << ((a + b + c) * (a + b + c)) - (a * a) - (c * c) - (e * e) << endl;
  return 0;
}
