#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  vector<pair<double, double> > coords;
  double c = sqrt(3), area = 0;
  double l[6] = {0};
  for (int i = 0; i < 6; i++) cin >> l[i];
  coords.push_back({0.0, 0.0});
  coords.push_back({l[0], 0.0});
  coords.push_back({l[0] + 0.5 * l[1], -c * 0.5 * l[1]});
  coords.push_back(
      {coords[2].first - 0.5 * l[2], coords[2].second - c * 0.5 * l[2]});
  coords.push_back({coords[3].first - l[3], coords[3].second});
  coords.push_back(
      {coords[4].first - 0.5 * l[4], coords[4].second + c * 0.5 * l[4]});
  for (int i = 0; i < 5; i++) area += coords[i].first * coords[i + 1].second;
  area += coords[5].first * coords[0].second;
  for (int i = 0; i < 5; i++) area -= coords[i].second * coords[i + 1].first;
  area -= coords[5].second * coords[0].first;
  area = abs(area) / 2;
  cout << fixed << setprecision(0);
  cout << area / c * 4;
  return 0;
}
