#include <bits/stdc++.h>
using namespace std;
double dfs(vector<int> e[], vector<double> c[], int i, double tot,
           bool visited[], int destiny) {
  if (i == destiny) {
    cout << tot << '\n';
    return tot;
  }
  double ans = 0.0;
  visited[i] = 1;
  for (int j = 0; j < e[i].size(); j++) {
    if (!visited[e[i][j]]) {
      ans = max(ans, dfs(e, c, e[i][j], tot + c[i][e[i][j]], visited, destiny));
    }
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  long long afe = a + f + e;
  cout << afe * afe - a * a - c * c - e * e << '\n';
  return 0;
}
