#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-8;
const double pi = acos(-1);
long long dcmp(double a, double b) {
  return fabs(a - b) <= EPS ? 0 : a < b ? -1 : 1;
}
void debug() {}
int const N = 1e4 + 9, M = 100 + 9, OO = 1e9;
int main() {
  cout << fixed << setprecision(0);
  ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  debug();
  long long a1, a2, a3, a4, a5, a6;
  cin >> a1 >> a2 >> a3 >> a4 >> a5 >> a6;
  long long areaOfBigTrig = (a1 + a2 + a3) * (a1 + a2 + a3);
  long long areaOf1st = a1 * a1, areaOf2nd = a3 * a3, areaOf3rd = a5 * a5;
  cout << areaOfBigTrig - areaOf1st - areaOf2nd - areaOf3rd;
}
