#include<iostream>
using namespace std;
int a_x, a_y, h_x, h_y,sum=0;//a_x,a_y代表目标地点,h_x,h_y代表马的位置
long long map[21][21] = { 0 };//最后结果大,需要开long long
void dfs(int x,int y) {
if (x == a_x && y == a_y) {//到达目标地点
sum++;
return;
}
if (x+1<=a_x&&map[x + 1][y]!=-1) dfs(x + 1, y);//访问x+1
if (y+1<=a_y&&map[x][y + 1]!=-1) dfs(x, y + 1);//访问y+1
}
int main() {
cin >> a_x >> a_y >> h_x >> h_y;
int x_y[9][2] = { {0,0},{2,1},{1,2},{2,-1},{-1,2},{-2,1},{1,-2},{-2,-1},{-1,-2} };
for (int i = 0; i < 9; i++)//标记马的控制区域
map[h_x + x_y[i][0]][h_y+x_y[i][1]] = -1;
dfs(0,0);
cout<<sum<<endl;
return 0;
}