#include <bits/stdc++.h>
int main() {
  int a[6];
  for (int i = 0; i < 6; i++) scanf("%d", &a[i]);
  float square = 0;
  float x = 0;
  float y = 0;
  for (int i = 0; i < 6; i++) {
    float x1, y1;
    switch (i) {
      case 0:
        x1 = x + a[i];
        y1 = y;
        break;
      case 1:
        x1 = x + a[i] / 2.0;
        y1 = y + a[i];
        break;
      case 2:
        x1 = x - a[i] / 2.0;
        y1 = y + a[i];
        break;
      case 3:
        x1 = x - a[i];
        y1 = y;
        break;
      case 4:
        x1 = x - a[i] / 2.0;
        y1 = y - a[i];
        break;
      case 5:
        x1 = x + a[i] / 2.0;
        y1 = y - a[i];
        break;
    }
    square += (x + x1) * (y - y1);
    x = x1;
    y = y1;
  }
  if (square < 0) square = -square;
  printf("%d", (int)square);
}
