#include <bits/stdc++.h>
using namespace std;
int main() {
  int arr[6], a;
  for (auto i = 0; i < 6; i++) {
    cin >> arr[i];
  }
  cout << 2 * (arr[1] + arr[2]) * (arr[3] + arr[4]) -
              (arr[1] * arr[1] + arr[4] * arr[4])
       << "\n";
}
