#include <iostream>
using std::cin ;
using std::cout ;
long long a[10][10] , x1 , y1 , x2 , y2 ;
void work(long long x,long long y){
a[x][y] = -1 ;
a[x-1][y-2] = -1 ;
a[x-2][y-1] = -1 ;
a[x-2][y+1] = -1 ;
a[x-1][y+2] = -1 ;
a[x+1][y-2] = -1 ;
a[x+2][y-1] = -1 ;
a[x+2][y+1] = -1 ;
a[x+1][y+2] = -1 ;
return ;
}
int main () {
cin >> x1 >> y1 >> x2 >> y2 ;
work ( x2 , y2 ) ;
a[1][0] = 1 , a[0][1] = 1 ;
for ( int i = 0 ; i <= x2 ; i ++ ) {
for ( int j = 0 ; j <= y2 ; j++ ) {
if ( a[i][j] != -1 && i && j ) {
long long m = a[i-1][j] != -1 ? a[i-1][j] : 0 ;
long long n = a[i][j-1] != -1 ? a[i][j-1] : 0 ;
a[i][j] = m+n ;
}
}
}
cout << a[x2][y2] ;
return 0 ;
}