#include <iostream>
using namespace std;
bool ed[21][21];
int movex[2] = { 1,0 }, movey[2] = { 0,1 };
int movehx[8] = { 1, 2, -1, -2,1,2,-1,-2 }, movehy[8] = { 2, 1, -2, -1,-2,-1,2,1 };
struct path
{
int x = 0, y = 0;
};
void horse(int bx, int by, int hx, int hy,bool ed[21][21])
{
ed[hx][hy] = true;
for (int i = 0; i < 8; i++)
{
if (hx + movehx[i] <= bx && hy + movehy[i] <= by&& hx + movehx[i]>=0&& hy + movehy[i]>=0)
{
int x = hx + movehx[i], y = hy + movehy[i];
ed[x][y] = true;
}
}
}
void way(path a,bool ed[21][21],int &n,int bx,int by)
{
if (a.x == bx && a.y == by) { n++; return; }
for (int i = 0; i < 2; i++)
{
a.x += movex[i], a.y += movey[i];
if (!ed[a.x][a.y]&&a.x <= bx && a.y <= by)
way(a, ed, n, bx, by);
a.x -= movex[i], a.y -= movey[i];
}
return;
}
int main()
{
path a;
int sum = 0;
int bx, by, hx, hy;
cin >> bx >> by >> hx >> hy;
horse(bx, by, hx, hy, ed);
way(a, ed, sum, bx, by); cout << sum;
}