#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
const int MOD = (int)1e9 + 7;
const double PI = acos(-1);
const int INF = 1234567890;
const int MAXN = 100001;
inline int sq(int x) { return x * x; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int a[7];
  for (int i = 1; i <= 6; ++i) {
    cin >> a[i];
  }
  cout << sq(a[1] + a[2] + a[3]) - sq(a[1]) - sq(a[3]) - sq(a[5]) << endl;
  return 0;
}
