cpp:
#include<bits/stdc++.h>
using namespace std;
bool m[25][25];
int dx[10]={-1,-2,-1,-2, 1, 2, 1, 2};
int dy[10]={-2,-1, 2, 1,-2,-1, 2, 1},ans;
int hx,hy,bx,by;
void dfs(int x,int y)
{
if(x==bx&&y==by)ans++;return ;
if(x+1<=bx&&m[x+1][y]==false)dfs(x+1,y);
if(y+1<=by&&m[x][y+1]==false)dfs(x,y+1);
if(m[x+1][y]&&m[x][y+1])return ;
}
int main()
{
cin>>bx>>by>>hx>>hy;
for(int i=0;i<8;i++)
{
if(hx+dx[i]>=0&&hx+dx[i]<=bx&&hy+dy[i]>=0&&hy+dy[i]<=by)m[hx+dx[i]][hy+dy[i]];
}
dfs(0,0);
cout<<ans;
return 0;
}