#include <bits/stdc++.h>
using namespace std;
void init() {}
void solve() {
  int n, x, m, y;
  cin >> n >> x >> m >> y;
  if (x > y) swap(n, m), swap(x, y);
  long long res = n + m + 1;
  for (int _n(n + 1), r(1); r < _n; r++) {
    int lx = x - r, rx = x + r;
    int ly = y - m, ry = y + m;
    if (rx <= y) {
      res += max(0, 2 * (rx - max(ly, lx + 1)) - 1);
    }
    if (rx > y && y - (rx - y) > ly) {
      res += max(0, 2 * (y - (rx - y) - max(ly, lx + 1)));
    }
  }
  cout << res << endl;
}
int main() {
  init();
  solve();
  return 0;
}
