#include <iostream>
#include <vector>
using namespace std;
int main() {
long long tx, ty, hx, hy;
cin >> tx >> ty >> hx >> hy;
vector<vector<long long>> dp(tx + 1, vector<long long>(ty + 1, 0));
for (int i = 0; i <= tx; i++) {
if (abs(i - hx) * abs(i - hx) + hy * hy != 5)
dp[i][0] = 1;
else break;
}
for (int i = 0; i <= tx; i++) {
if (hx * hx + abs(i - hy) * abs(i - hy) != 5)
dp[0][i] = 1;
else break;
}
dp[hx][hy] = 0;
for (int i = 1; i <= tx; i++) {
for (int j = 1; j <= ty; j++) {
if (abs(i - hx) * abs(i - hx) + abs(j - hy) * abs(j - hy) != 5) {
if (!(i == hx && j == hy))
dp[i][j] = dp[i - 1][j] + dp[i][j - 1];
}
}
}
cout << dp[tx][ty];
return 0;
}