#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int x1, x2, y2;
int exam(int i, int j)
{
if (abs(i - x2) == 1 && abs(j - y2) == 2)
{
return 0;
}
else if (abs(i - x2) == 2 && abs(j - y2) == 1)
{
return 0;
}
else if (i == x2 && j == y2)
{
return 0;
}
else
{
return 1;
}
}
int main()
{
int y1;
scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
long long **sort = (long long **)malloc((x1 + 1) * sizeof(long long *));
for (int i = 0; i <= x1; i++)
{
sort[i] = (long long *)malloc((y1 + 1) * sizeof(long long));
}
for (int i = 0; i <= x1; i++)
{
sort[i][0] = (exam(i, 0)) ? 1 : 0;
}
for (int i = 0; i <= y1; i++)
{
sort[0][i] = (exam(0, i)) ? 1 : 0;
}
for (int i = 1; i <= x1; i++)
{
for (int j = 1; j <= y1; j++)
{
if (exam(i, j))
{
sort[i][j] = sort[i][j - 1] + sort[i - 1][j];
}
else
{
sort[i][j] = 0;
}
}
}
printf("%lld\n", sort[x1][y1]);
for (int i = 0; i <= x1; i++)
{
free(sort[i]);
}
free(sort);
return 0;
}