#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5000 + 5;
int N, x, M, y;
int main() {
  cin >> N >> x >> M >> y;
  if (x > y) {
    swap(x, y);
    swap(N, M);
  }
  long long parts = N + 1;
  int xr = x + N;
  int xyr = min(y, xr);
  int xl = x - N;
  for (int i = 1; i <= M; i++) {
    int l = y - i;
    int r = y + i;
    if (xyr <= l) {
    } else if (x <= l) {
      int rx = r - x;
      if (N < rx) {
        rx = N;
      } else {
        rx = rx - 1;
      }
      int lx = l - x;
      int sect = rx - lx;
      parts += (sect * 2 - 1);
    } else if (xl <= l) {
      int sect = x - l;
      int rx = r - x;
      if (N < rx) {
        rx = N;
      } else {
        rx = rx - 1;
      }
      sect = rx - sect;
      parts += sect * 2;
    } else {
    }
    parts += 1;
  }
  cout << parts << endl;
}
