#include <bits/stdc++.h>
using namespace std;
const long long int N = 2e7, M = 1e6 + 3;
map<int, int> m2;
bool b[N];
int a[N];
vector<int> v;
long long ans = 0, n, l, r, x;
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  cout << (a + b + c) * (a + b + c) - a * a - c * c - e * e;
}
