#include <bits/stdc++.h>
using namespace std;
const int dx[9] = {0, 1, -1, 0, 0, -1, -1, 1, 1};
const int dy[9] = {0, 0, 0, -1, 1, -1, 1, -1, 1};
const double pi = acos(-1.0);
long long a[7];
long long sqr(long long x) { return x * x; }
int main() {
  for (int i = 1; i <= 6; i++) cin >> a[i];
  cout << sqr(a[1] + a[2] + a[3]) - (sqr(a[1]) + sqr(a[3]) + sqr(a[5]));
  return 0;
}
