#include<iostream>
using namespace std;
int main(){
long long a[25][25];
int xb,yb,xh,yh;
cin>>xb>>yb>>xh>>yh;
a[0][0]=1;
for(int i=0;i<=xb;i++)
for(int j=0;j<=yb;j++)
{
if(i==xh&&j==yh)a[i][j]=0;
else if(i==xh-1&&j==yh+2)a[i][j]=0;
else if(i==xh-1&&j==yh-2)a[i][j]=0;
else if(i==xh+1&&j==yh+2)a[i][j]=0;
else if(i==xh+1&&j==yh-2)a[i][j]=0;
else if(i==xh-2&&j==yh+1)a[i][j]=0;
else if(i==xh-2&&j==yh-1)a[i][j]=0;
else if(i==xh+2&&j==yh-1)a[i][j]=0;
else if(i==xh+2&&j==yh+1)a[i][j]=0;
else if(i==0||j==0)a[i][j]=1;
else a[i][j]=a[i-1][j]+a[i][j-1];
}
cout<<a[xb][yb];
return 0;
}