#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 2, 1, -1, -2, -2, -1, 1, 2};
int dy[] = {0, 1, 2, 2, 1, -1, -2, -2, -1};
long long a[30][30];
int main()
{
int x1, y1, x2, y2;
cin >> x1 >> y1 >> x2 >> y2;
for (int i = 0; i <= x1; i++)
{
for (int j = 0; j <= y1; j++)
{
a[i][j] = -1;
}
}
for (int i = 0; i < 9; i++)
{
int x = x2 + dx[i];
int y = y2 + dy[i];
if (x >= 0 && y >= 0 && x <= x1 && y <= y1)
{
a[x][y] = 0;
}
}
for (int i = 0; i <= y1; i++)
{
if (a[0][i] == -1)
{
a[0][i] = 1;
}
}
for (int i = 0; i <= x1; i++)
{
if (a[i][0] == -1)
{
a[i][0] = 1;
}
}
for (int i = 1; i <= x1; i++)
{
for (int j = 1; j <= y1; j++)
{
if (a[i][j] != -1)
{
continue;
}
a[i][j] = a[i - 1][j] + a[i][j - 1];
}
}
printf("%lld", a[x1][y1]);
return 0;
}