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