#include <bits/stdc++.h>
using namespace std;
int main() {
  int mas[6];
  for (int i = 0; i < 6; ++i) cin >> mas[i];
  int s = 0;
  for (int i = 0; i < 3; ++i) {
    s += mas[2 * i] * mas[2 * i];
    mas[2 * i + 1] += mas[2 * i];
    mas[(2 * i - 1 + 6) % 6] += mas[2 * i];
  }
  cout << mas[1] * mas[1] - s;
}
