#include <bits/stdc++.h>
struct point {
  double x, y;
  inline void print() { printf("%lf %lf\n", x, y); }
  inline point(double x = 0, double y = 0) : x(x), y(y) {}
  inline point operator-(const point& b) const {
    return point(x - b.x, y - b.y);
  }
} p[6];
inline double area(const point& a, const point& b) {
  return fabs(a.x * b.y - a.y * b.x);
}
double ans = 0;
const double bas = acos(-1.0) / 3;
const double siz = sqrt(3.0) / 4;
double theta = bas;
double xx, yy, x;
int main() {
  p[0].x = 0;
  p[0].y = 0;
  scanf("%lf", &x);
  p[1].x = x;
  p[1].y = 0;
  scanf("%lf", &x);
  p[2].x = p[1].x + x * cos(bas);
  p[2].y = x * sin(bas);
  scanf("%lf", &x);
  p[3].x = p[2].x - x * cos(bas);
  p[3].y = p[2].y + x * sin(bas);
  scanf("%lf", &x);
  p[4].x = p[3].x - x;
  p[4].y = p[3].y;
  scanf("%lf", &x);
  scanf("%lf", &x);
  p[5].x = -x * cos(bas);
  p[5].y = x * sin(bas);
  for (int i = (1), __ = (5); i < __; ++i)
    ans += area(p[i] - p[0], p[i + 1] - p[0]);
  printf("%d\n", int(ans / 2 / siz + 0.5));
  return 0;
}
