#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> hex(6, 0);
  for (int i = 0; i < 6; i++) cin >> hex[i];
  int side = hex[0] + hex[1] + hex[2];
  double total_area = side * side;
  double a1 = hex[0] * hex[0];
  double a2 = hex[2] * hex[2];
  double a3 = hex[4] * hex[4];
  double area_rem = total_area - a1 - a2 - a3;
  cout << int(area_rem) << endl;
  return 0;
}
