#include <iostream>
#include <vector>
using namespace std;
struct Pos {
int x, y;
};
Pos ma, tgt;
unsigned long count[100][100] = { 0 };
bool inCtrl[100][100] = { false };
int main(void) {
cin >> tgt.x >> tgt.y >> ma.x >> ma.y;
inCtrl[ma.x][ma.y] = true;
inCtrl[ma.x + 1][ma.y + 2] = true;
inCtrl[ma.x + 2][ma.y + 1] = true;
if (ma.y >= 1)
inCtrl[ma.x + 2][ma.y - 1] = true;
if (ma.y >= 2)
inCtrl[ma.x + 1][ma.y - 2] = true;
if (ma.x >= 1 && ma.y >= 2)
inCtrl[ma.x - 1][ma.y - 2] = true;
if (ma.x >= 2 && ma.y >= 1)
inCtrl[ma.x - 2][ma.y - 1] = true;
if (ma.x >= 2)
inCtrl[ma.x - 2][ma.y + 1] = true;
if (ma.x >= 1)
inCtrl[ma.x - 1][ma.y + 2] = true;
for (int i = 0; i <= tgt.x; i++) {
for (int j = 0; j <= tgt.y; j++) {
if (i == 0) {
if (j == 0) {
::count[i][j] = 1;
}
else {
::count[i][j] = ::count[i][j - 1];
}
continue;
}
if (j == 0) {
::count[i][j] = ::count[i - 1][j];
continue;
}
if (inCtrl[i][j]) {
::count[i][j] = 0;
continue;
}
::count[i][j] = ::count[i - 1][j] + ::count[i][j - 1];
}
}
cout << ::count[tgt.x][tgt.y] << endl;
}