#include <bits/stdc++.h>
using namespace std;
int a, b, c, d, e, f;
void read() { cin >> a >> b >> c >> d >> e >> f; }
void solve() {
  int res = 0;
  res += (a + b + f) * (a + b + f);
  res -= f * f;
  res -= b * b;
  res -= d * d;
  cout << res << endl;
}
int main() {
  read();
  solve();
  return 0;
}
