#include <bits/stdc++.h>
using namespace std;
int a[6];
int dx[6] = {2, 1, -1, -2, -1, 1};
int dy[6] = {0, 1, 1, 0, -1, -1};
int x[7];
int y[7];
int main() {
  for (int i = 0; i < (6); i++) {
    scanf("%d", &a[i]);
  }
  x[0] = 0;
  y[0] = 0;
  for (int i = 0; i < 6; i++) {
    x[i + 1] = x[i] + a[i] * dx[i];
    y[i + 1] = y[i] + a[i] * dy[i];
  }
  assert(x[0] == x[6] && y[0] == y[6]);
  int res = 0;
  for (int i = 0; i < 6; i++) {
    res += x[i] * y[i + 1] - y[i] * x[i + 1];
  }
  assert(res % 2 == 0);
  printf("%d\n", res / 2);
  return 0;
}
