#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
const long long int INF = 1e18;
const int N = 100005;
const int MOD = 1e9 + 7;
const double EPS = 1e-6;
const double PI = acos(-1.0);
int main(int argc, char const *argv[]) {
  int a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  int side = a + b + c;
  int tot = side * side;
  int bad = a * a + c * c + e * e;
  cout << tot - bad << endl;
  return 0;
}
