#include<iostream>
#define MAXN 100000000
using namespace std;
int hx, hy, ex, ey;
long long dp[25][25];
int horse[8][2] = {{-2, -1}, {-2, 1}, {-1, -2}, {-1, 2}, {1, -2}, {1, 2}, {2, -1}, {2, 1}};
void start() {
for (int i = 0; i < 8; i++) {
int tx = hx + horse[i][0];
int ty = hy + horse[i][1];
if (tx < 0 || ty < 0) {
continue;
}
dp[tx][ty] = MAXN;
}
dp[hx][hy] = MAXN;
bool f1 = true;
bool f2 = true;
for (int i = 0; i <= ex; i++) {
if (dp[i][0] == MAXN) {
f1 = false;
}
if (dp[0][i] == MAXN) {
f2 = false;
}
if (!f1) {
dp[0][i] = 1;
}
else if (!f2) {
dp[i][0] = 1;
}
else {
dp[i][0] = dp[0][i] = 1;
}
}
}
int main() {
cin >> ex >> ey >> hx >> hy;
start();
for (int i = 1; i <= ex; i++) {
for (int j = 1; j <= ey; j++) {
if (dp[i - 1][j] == MAXN && dp[i][j - 1] == MAXN) {
continue;
}
else if (dp[i - 1][j] == MAXN) {
dp[i][j] = dp[i][j - 1];
}
else if (dp[i][j - 1] == MAXN) {
dp[i][j] = dp[i - 1][j];
}
else if (dp[i][j] == MAXN) {
continue;
}
else {
dp[i][j] = dp[i - 1][j] + dp[i][j - 1];
}
}
}
cout << (dp[ex][ey] == MAXN ? 0 : dp[ex][ey]);
return 0;
}