#include<iostream>
using namespace std;
int xm,ym,zdx,zdy;
int cnt=0;
bool lan(int x,int y,int xm,int ym){
if((x==xm+1&&y==ym+2)||(x==xm+2&&y==ym+1))return false;
if((x==xm-1&&y==ym-2)||(x==xm-2&&y==ym-1))return false;
if((x==xm-1&&y==ym+2)||(x==xm-2&&y==ym+1))return false;
if((x==xm+1&&y==ym-2)||(x==xm+2&&y==ym-1))return false;
return true;
}
void zu(int x,int y){
if(x==xm&&y==ym)return;
if(!lan(x,y,xm,ym))return;
if(x>zdx)return;
if(y>zdy)return;
if(x==zdx&&y==zdy){
cnt++;
return;
}
zu(x+1,y);
zu(x,y+1);
}
int main(){
cin>>zdx>>zdy>>xm>>ym;
zu(0,0);
cout<<cnt;
}