#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
using namespace std;
long long f[45][45];
int n, m, hx, hy;
bool horse[45][45];
void check_horse(int x, int y)
{
horse[x][y] = true;
if (x - 2 >= 0 && y - 1 >= 0) horse[x - 2][y - 1] = true;
if (x - 2 >= 0 && y + 1 < m) horse[x - 2][y + 1] = true;
if (x - 1 >= 0 && y - 2 >= 0) horse[x - 1][y - 2] = true;
if (x - 1 >= 0 && y + 2 < m) horse[x - 1][y + 2] = true;
if (x + 1 < n && y - 2 >= 0) horse[x + 1][y - 2] = true;
if (x + 1 < n && y + 2 < m) horse[x + 1][y + 2] = true;
if (x + 2 < n && y - 1 >= 0) horse[x + 2][y - 1] = true;
if (x + 2 < n && y + 1 < m) horse[x + 2][y + 1] = true;
}
int main()
{
cin >> n >> m >> hx >> hy;
f[0][0] = 1;
for (int i = 0; i <= n; i++)
for (int j = 0; j <= m; j++)
{
horse[i][j] = false;
}
check_horse(hx, hy);
for (int i = 0; i <= n; i++)
{
for (int j = 0; j <= m; j++)
{
if (i != 0)
{
f[i][j] += f[i - 1][j];
}
if (j != 0)
{
f[i][j] += f[i][j - 1];
}
if (horse[i][j] == true)
{
f[i][j] = 0;
}
}
}
cout << f[n][m] << endl;
return 0;
}