#include <bits/stdc++.h>
using namespace std;
int i, j, k, l;
template <class T>
void print(T x[], int size) {
  for (int i = 0; i < size; ++i) cout << x[i] << " ";
  cout << endl;
}
int main() {
  int a[6];
  long long z = 0;
  for (i = 0; i < 6; ++i) cin >> a[i];
  z = (a[0] + a[2] + a[1]) * (a[1] + a[2] + a[0]);
  z -= (a[0] * a[0]);
  z -= (a[2] * a[2]);
  z -= (a[4] * a[4]);
  cout << z << endl;
}
