#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fll;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  vector<int> a(6);
  for (int& i : a) cin >> i;
  int ans = 0;
  auto trian = [&](int side) { return side * side; };
  ans = trian(a[0] + a[1] + a[5]) - trian(a[1]) - trian(a[3]) - trian(a[5]);
  assert(ans ==
         trian(a[0] + a[1] + a[2]) - trian(a[0]) - trian(a[2]) - trian(a[4]));
  cout << ans << '\n';
  return 0;
}
