#include <bits/stdc++.h>
using namespace std;
template <typename G1, typename G2 = G1, typename G3 = G1>
struct triple {
  G1 first;
  G2 second;
  G3 T;
};
complex<long double> rotate(complex<long double> p, long double ang) {
  long double x = p.real();
  long double y = p.imag();
  ang = (acosl(-1.0) * ang) / 180.0;
  return {x * cosl(ang) - y * sinl(ang), x * sinl(ang) + y * cosl(ang)};
}
template <typename T>
T dot(complex<T> a, complex<T> b) {
  return real(conj(a) * b);
}
template <typename T>
T cross(complex<T> a, complex<T> b) {
  return imag(conj(a) * b);
}
long double area2(const vector<complex<long double> > &P) {
  long double A = 0;
  for (int i = 0, n = P.size(); i < n; ++i)
    A += cross(P[i], P[(((i) + 1) % n)]);
  return A;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  vector<int> v(6);
  for (auto &i : v) cin >> i;
  cout << (v[0] + v[1] + v[2]) * (v[0] + v[1] + v[2]) - v[0] * v[0] -
              v[2] * v[2] - v[4] * v[4]
       << '\n';
  return 0;
}
