#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
using ll = long long;
bool st[25][25];
int dp[25][25];
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
memset(st, 0, sizeof(st));
int n, m, hx, hy;
cin >> n >> m >> hx >> hy;
st[hx][hy] = 1;
if (hx - 2 >= 0) st[hx - 2][hy + 1] = 1;
if (hx - 2 >= 0 && hy - 1 >= 0) st[hx - 2][hy - 1] = 1;
if (hx - 1 >= 0) st[hx - 1][hy + 2] = 1;
if (hx - 1 >= 0 && hy - 2 >= 0) st[hx - 1][hy - 2] = 1;
if (hy - 2 >= 0) st[hx + 1][hy - 2] = 1;
st[hx + 1][hy + 2] = 1;
if (hy - 1 >= 0) st[hx + 2][hy - 1] = 1;
st[hx + 2][hy + 1] = 1;
for (int i = 0; i <= n; i++) {
for (int j = 0; j <= m; j++) {
if (!st[i][j]) {
if (i == 0 && j == 0)
dp[i][j] = 1;
else
dp[i][j] = dp[i - 1][j] + dp[i][j - 1];
}
}
}
cout << dp[n][m] << "\n";
return 0;
}
RT