#include <bits/stdc++.h>
const int MAX_N = (int)1e5 + 123;
const double eps = 1e-6;
const int inf = (int)1e9 + 123;
using namespace std;
int x, y, x2, y2, what;
int calc(int x, int l, int r) {
  if (abs((x + l) % 2) != what) l++;
  if (abs((x + r) % 2) != what) r--;
  if (l > r) return 0;
  int len = r - l + 1;
  return len / 2 + len % 2;
}
int main() {
  cin >> x >> y >> x2 >> y2;
  what = abs((x + y) % 2);
  if (x == x2) {
    cout << calc(x, y, y2);
    return 0;
  }
  int first = calc(x, y, y2);
  int second = calc(x + 1, y, y2);
  long long ans = 0;
  int ff = (x2 - x + 1) / 2 + (x2 - x + 1) % 2, ss = (x2 - x + 1) / 2;
  cout << 1ll * ff * first + 1ll * ss * second;
  return 0;
}
