#include <bits/stdc++.h>
using namespace std;
int dx4[] = {0, 0, 1, -1};
int dy4[] = {-1, 1, 0, 0};
int dx8[] = {0, 0, 1, -1, -1, -1, 1, 1};
int dy8[] = {-1, 1, 0, 0, 1, -1, -1, 1};
double trngle_area_hiron(double a, double b, double c) {
  double s = (a + b + c) / 2.0;
  return sqrt(s * (s - a) * (s - b) * (s - c));
}
double oppst_side_of_angle(double a, double b, double angle) {
  angle = (acos(-1.0) * angle) / 180.0;
  return sqrt(a * a + b * b - (2 * a * b * cos(angle)));
}
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  double a, b, c, d, e, f, h, i, j, ar = 0.0;
  cin >> a >> b >> c >> d >> e >> f;
  h = oppst_side_of_angle(a, b, 120), i = oppst_side_of_angle(c, d, 120),
  j = oppst_side_of_angle(e, f, 120);
  ar += (trngle_area_hiron(a, b, h) + trngle_area_hiron(c, d, i) +
         trngle_area_hiron(e, f, j) + trngle_area_hiron(h, i, j));
  ar /= trngle_area_hiron(1, 1, 1);
  cout << setprecision(0) << fixed << ar << endl;
  return 0;
}
