#include <bits/stdc++.h>
using namespace std;
static const double EPS = 1e-8;
int main() {
  istream &fin = cin;
  long long N, x, M, y;
  fin >> N >> x >> M >> y;
  if (x > y) {
    swap(x, y);
    swap(N, M);
  }
  long long res = 0;
  for (int i = 1; i <= M; i++) {
    long long miny = y - i, maxy = y + i;
    if (x > miny) {
      long long mul = min(N, maxy - x - 1) - max(1LL, x - miny) + 1;
      if (mul > 0) res += mul * 2;
    } else {
      long long mul = min(N, maxy - x - 1) - max(1LL, miny - x + 1) + 1;
      if (mul > 0) res += mul * 2;
    }
    if (x + N <= miny || x - N > miny) res++;
  }
  for (int i = 1; i <= N; i++) {
    if (x - i < y - M) res++;
  }
  res++;
  cout << res;
}
