#include <iostream>
#include <cstring>
using namespace std;
int horse_x, horse_y, destination_x, destination_y;
void initialize(unsigned long long (&go)[21][21])
{
go[horse_x][horse_y]=0;
if ((horse_x - 1 <= 20 && horse_x - 1 >= 0) && (horse_y - 2 <= 20 && horse_y - 2 >= 0))
go[horse_x - 1][horse_y - 2] = 0;
if ((horse_x + 1 <= 20 && horse_x + 1 >= 0) && (horse_y - 2 <= 20 && horse_y - 2 >= 0))
go[horse_x + 1][horse_y - 2] = 0;
if ((horse_x - 2 <= 20 && horse_x - 2 >= 0) && (horse_y - 1 <= 20 && horse_y - 1 >= 0))
go[horse_x - 2][horse_y - 1] = 0;
if ((horse_x - 2 <= 20 && horse_x - 2 >= 0) && (horse_y + 1 <= 20 && horse_y + 1 >= 0))
go[horse_x - 2][horse_y + 1] = 0;
if ((horse_x - 1 <= 20 && horse_x - 1 >= 0) && (horse_y + 2 <= 20 && horse_y + 2 >= 0))
go[horse_x - 1][horse_y + 2] = 0;
if ((horse_x + 1 <= 20 && horse_x + 1 >= 0) && (horse_y + 2 <= 20 && horse_y + 2 >= 0))
go[horse_x + 1][horse_y + 2] = 0;
if ((horse_x + 2 <= 20 && horse_x + 2 >= 0) && (horse_y - 1 <= 20 && horse_y - 1 >= 0))
go[horse_x + 2][horse_y - 1] = 0;
if ((horse_x + 2 <= 20 && horse_x + 2 >= 0) && (horse_y + 1 <= 20 && horse_y + 1 >= 0))
go[horse_x + 2][horse_y + 1] = 0;
go[0][0] = go[1][0] = go[0][1] = 1;
}
unsigned long long mark(unsigned long long (&go)[21][21], int i, int j)
{
if (1>=i + j)
{
return 1;
}
else if (0 <= i - 1 && i - 1 <= 20 && j - 1 >= 0 && j - 1 <= 20 && go[i][j] == 114514)
{
return go[i][j] = mark(go, i - 1, j) + mark(go, i, j - 1);
}
else if (0 <= i - 1 && i - 1 <= 20 && !(j - 1 >= 0 && j - 1 <= 20) && go[i][j] == 114514)
{
return go[i][j] = mark(go, i - 1, j);
}
else if (!(0 <= i - 1 && i - 1 <= 20) && j - 1 >= 0 && j - 1 <= 20 && go[i][j] == 114514)
{
return go[i][j] = mark(go, i, j - 1);
}
return go[i][j];
}
int main()
{
cin >> destination_x >> destination_y>>horse_x >> horse_y ;
unsigned long long num[21][21];
for (int i = 0; i < 21; ++i)
{
for (int j = 0; j < 21; ++j)
{
num[i][j] = 114514;
}
}
initialize(num);
printf("%lld", mark(num, destination_x, destination_y));
return 0;
}