#include <bits/stdc++.h>
using namespace std;
long long n, x, i, j, k, a, b, c;
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  long long a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  k += (a + b + c) * (a + b + c);
  k -= a * a + c * c + e * e;
  cout << k;
}
