#include <bits/stdc++.h>
using namespace std;
long long deret(int a) { return a * (a + 1) / 2 + a * (a - 1) / 2; }
int main() {
  int a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  long long hasil = 0;
  int sisi = a + b + c;
  long long jlh = deret(sisi);
  long long kurang = deret(a) + deret(c) + deret(e);
  hasil = jlh - kurang;
  cout << hasil << endl;
}
