#include <bits/stdc++.h>
using namespace std;
map<string, int> does;
int aara[1007][1007];
int visit[1007][1007];
long long docu[500 + 7];
int n, m;
bool comp(const pair<int, int>& a, const pair<int, int>& b) {
  return a.first > b.first;
}
int l[] = {0, 0, 1, -1};
int d[] = {1, -1, 0, 0};
void bfs(int x, int y) {
  memset(visit, -1, sizeof visit);
  queue<pair<int, int> > q;
  q.push({x, y});
  visit[x][y] = 0;
  while (!q.empty()) {
    int u = q.front().first;
    int v = q.front().second;
    q.pop();
    for (int i = 0; i < 4; i++) {
      int xx = u + l[i];
      int yy = v + d[i];
      if (xx > 0 && yy > 0 && xx <= n && yy <= m && aara[xx][yy] == 0 &&
          visit[xx][yy] == -1) {
        visit[xx][yy] = visit[u][v] + 1;
        q.push({xx, yy});
      }
    }
  }
}
long long ara[3 * 100000 + 7];
long long dat[100000 + 7];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.precision(20);
  cout.tie(0);
  cin >> ara[0] >> ara[1] >> ara[2] >> ara[3] >> ara[4] >> ara[5];
  long long solve = (ara[0] + ara[1] + ara[2]) * (ara[0] + ara[1] + ara[2]);
  solve -= ((ara[0] * ara[0]) + (ara[2] * ara[2]) + (ara[4] * ara[4]));
  cout << solve << endl;
}
