#include <bits/stdc++.h>
using namespace std;
void solve() {
  int a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  int area_big_triangle = (a + b + c) * (a + b + c);
  int area_corner_triangle_1 = a * a;
  int area_corner_triangle_2 = c * c;
  int area_corner_triangle_3 = e * e;
  int area_hexagon = area_big_triangle - area_corner_triangle_1 -
                     area_corner_triangle_2 - area_corner_triangle_3;
  cout << area_hexagon << '\n';
}
int main() {
  solve();
  return 0;
}
