#include <iostream>
using namespace std;
int map[25][25];
int attack_x[] = { 0, -2, -1, 1, 2, 2, 1, -1, -2 };
int attack_y[] = { 0, 1, 2, 2, 1, -1, -2, -2, -1 };
bool check_being_attack(int temp_x, int temp_y, int horse_x, int horse_y)
{
for (int i = 0;i < 9;i++)
{
if (temp_x == horse_x + attack_x[i] && temp_y == horse_y + attack_y[i])
{
return true;
}
}
return false;
}
bool check_in_area(int temp_x, int temp_y, int horse_x, int horse_y)
{
if (temp_x >= 0 &&temp_x<=horse_x&&temp_y>=0&&temp_y<=horse_y)
{
return true;
}
return false;
}
long long int dp(int temp_x, int temp_y, int horse_x, int horse_y)
{
if (temp_x == 0 && temp_y == 0)
{
return 1;
}
if (check_in_area(temp_x, temp_y, horse_x, horse_y) == false)return 0;
if (check_being_attack(temp_x, temp_y,horse_x,horse_y) == true)return 0;
return dp(temp_x - 1, temp_y, horse_x, horse_y) + dp(temp_x, temp_y-1, horse_x, horse_y);
}
int main() {
int horse_x, horse_y, final_x, final_y;
cin >> final_x >> final_y >> horse_x >> horse_y;
cout << dp(final_x, final_y, horse_x, horse_y);
}