#include <bits/stdc++.h>
const double EPS = 1e-9;
const double PI = acos(-1.0);
const long long INF = 1070000000LL;
const long long MOD = 1000000007LL;
using namespace std;
int main() {
  cin.tie(NULL);
  ios_base::sync_with_stdio(false);
  int a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  int l = a + b + c;
  cout << l * l - a * a - c * c - e * e << endl;
}
