#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a1, a2, a3, a4, a5, a6;
  cin >> a1 >> a2 >> a3 >> a4 >> a5 >> a6;
  cout << ((long long int)pow(a1 + a2 + a3, 2) - (long long int)pow(a1, 2) -
           (long long int)pow(a3, 2) - (long long int)pow(a5, 2))
       << "\n";
}
