#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int arr[7];
  for (int i = 1; i <= 6; i++) cin >> arr[i];
  int bigEdge = arr[1] + arr[2] + arr[3];
  long long bigArea = bigEdge * bigEdge;
  long long miniAreas = arr[1] * arr[1];
  miniAreas += arr[3] * arr[3];
  miniAreas += arr[5] * arr[5];
  long long ans = bigArea - miniAreas;
  cout << ans;
  return 0;
}
