#include<iostream>
using namespace std;
typedef long long ll;
int ex, ey, hx, hy;
ll dp[25][25];
bool h[25][25];
void start() {
dp[1][2] = 1;
dp[2][1] = 1;
h[hx][hy] = true;
h[(hx >= 2 ? hx - 2 : 0)][(hy >= 1 ? hy - 1 : 0)] = true;
h[(hx >= 2 ? hx - 2 : 0)][hy + 1] = true;
h[(hx >= 1 ? hx - 1 : 0)][(hy >= 2 ? hy - 2 : 0)] = true;
h[(hx >= 1 ? hx - 1 : 0)][hy + 2] = true;
h[hx + 1][(hy >= 2 ? hy - 2 : 0)] = true;
h[hx + 1][hy + 2] = true;
h[hx + 2][(hy >= 1 ? hy - 1 : 0)] = true;
h[hx + 2][hy + 1] = true;
}
int main() {
cin >> ex >> ey >> hx >> hy;
start();
for (int i = 1; i <= ex; i++) {
for (int j = 1; j <= ey; j++) {
if (h[i][j] || dp[i][j]) {
continue;
}
dp[i][j] = dp[i - 1][j] + dp[i][j - 1];
}
}
cout << dp[ex][ey];
return 0;
}