#include <bits/stdc++.h>
using namespace std;
long long a, b, c, d;
int main(int argc, char **argv) {
  cin >> a >> b >> c >> d;
  long long y = (d - b) / 2 + 1;
  long long yy = y - 1;
  long long x = c - a + 1;
  cout << (x / 2 * yy + (x - x / 2) * y) << endl;
  return 0;
}
