#include <bits/stdc++.h>
int main() {
  int a, b, c, d, e, f, num;
  scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f);
  num = (pow((a + b + c), 2)) - (a * a) - (c * c) - (e * e);
  printf("%d", num);
  return 0;
}
