#include <bits/stdc++.h>
using namespace std;
const int INF = std::numeric_limits<int>::max() / 3;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a * (b / gcd(a, b)); }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int s1, s2, s3, s4, s5, s6;
  cin >> s1 >> s2 >> s3 >> s4 >> s5 >> s6;
  int ans = (s1 + s2 + s3) * (s1 + s2 + s3) - s1 * s1 - s3 * s3 - s5 * s5;
  cout << ans << endl;
  return 0;
}
