#include<bits/stdc++.h>
#define y1 yone
using namespace std;
bitset<25> vis[25];
int x1, y1, x2, y2, ans;
void dfs(int x, int y){
if(x < 0 or x > x1 or y < 0 or y > y1 or vis[x][y] or x == x2 and y == y2)
return;
if(abs(x - x2) == 2 and abs(y - y2) == 1 or abs(x - x2) == 1 and abs(y - y2) == 2)
return;
if(x == x1 and y == y1)
++ans;
vis[x].set(y);
dfs(x + 1, y);
dfs(x, y + 1);
vis[x].reset(y);
}signed main(){
cin >> x1 >> y1 >> x2 >> y2;
dfs(0, 0);
cout << ans;
return 0;
}