#include<iostream>
#include <cmath>
#include<string.h>
using namespace std;
int Bx = 0; int By = 0;
int Hx = 0; int Hy = 0;
int st[20][20];
int count = 0;
bool HourseFoot(int x, int y){
return (abs(x - Hx) == 1 && abs(y - Hy) == 2 || abs(x - Hx) == 2 && abs(y - Hy) == 1 || x == Hx && y == Hy);
}
void dfs(int x, int y){
if(x > Bx || y > By || HourseFoot(x, y) || st[x][y] != 0) return ;
if(x == Bx && y == By){
count ++;
return;
}
st[x][y] = 1;
if(x < Bx)
dfs(x + 1, y);
if(y < By)
dfs(x, y + 1);
st[x][y] = 0;
}
int main(){
cin >> Bx >> By >> Hx >> Hy;
for(int i = 0 ; i < 20; i++)
memset(st[i], 0, sizeof st[i]);
dfs(0, 0);
cout << count << endl;
}