#include<bits/stdc++.h>
using namespace std;
int xb,yb,xh,yh,ans;
void dp(int x,int y)
{
if((x==xh&&y==yh)||(x==xh+2&&y==yh+1)||(x==xh+1&&y==yh+2)||(x==xh+1&&y==yh-2)||(x==xh+2&&y==yh-1)||(x==xh-2&&y==yh-1)||(x==xh-1&&y==yh-2)||(x==xh-1&&y==yh+2)||(x==xh-2&&y==yh+1)||x>xb||y>yb) return;
if(x==xb&&y==yb)
{
ans++;
return;
}
dp(x,y+1);
dp(x+1,y);
}
int main()
{
cin>>xb>>yb>>xh>>yh;
dp(0,0);
cout<<ans<<endl;
return 0;
}