#include <bits/stdc++.h>
#define ll long long
#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define deb(x) cout<<#x<<"="<<x<<endl;
#define endl '\n'
#define M 1000000007
#define int long long
#define F first
#define S second
#define INF 1e18
#define N 1000005

using namespace std;
ll h, w, a, b;

ll go(vector<vector<ll>> &v, ll i, ll j, ll a, ll b)
{
	if (a < 0 || b < 0)return 0;
	if (j == w)
	{
		j = 0, ++i;
	}
	if (i == h)
	{
		return 1;
	}

	if (v[i][j] == 1)
	{
		return go(v, i, j + 1, a, b);
	}
	ll ans = 0;
	if (j + 1 < w && a > 0 && v[i][j] == 0 && v[i][j + 1] == 0)
	{
		v[i][j] = v[i][j + 1] = 1;
		ans += go(v, i, j + 1, a - 1, b);
		v[i][j] = v[i][j + 1] = 0;
	}
	if (i + 1 < h && a > 0 && v[i][j] == 0 && v[i + 1][j] == 0)
	{
		v[i][j] = v[i + 1][j] = 1;
		ans += go(v, i, j + 1, a - 1, b);
		v[i][j] = v[i + 1][j] = 0;
	}
	if (b > 0)
	{
		v[i][j] = 1;
		ans += go(v, i, j + 1, a, b - 1);
		v[i][j] = 0;
	}
	return ans;
}
void solve()
{
	cin >> h >> w;
	cin >> a >> b;
	vector<vector<ll>> v = vector<vector<ll>>(h, vector<ll>(w, 0));
	cout << go(v, 0, 0, a, b) << endl;

}

int32_t main()
{
	IOS
	ll T = 1;
	// cin >> T;
	for (ll i = 1; i <= T; ++i)
	{
		// cout<<"Case #"<<i<<": ";
		solve();
	}
	return 0;
}
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iomanip>
#include <ios>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>
// avoid unordered_map and unordered_set!!!
#include <vector>
#include <utility>

using namespace std;

using i64 = int64_t;
using u64 = uint64_t;
using i32 = int32_t;
using pi64 = pair<i64, i64>;

#define vec vector
#define let const
#define DRi64(x) i64 x; cin >> x;
#define DRS(x) string x; cin >> x;
#define DRVi64(v, n) vec<i64> v(n); { for (i64 i = 0; i < n; ++i) { cin >> v[i]; }}
#define DRpi64(x) pi64 x; cin >> x.first >> x.second;

#ifdef DEBUG
#define P(x) cerr << x << "\n"
#else
#define P(x)
#endif

constexpr i64 MAXN = 3*100*1000LL+5LL;
constexpr i64 MOD = 1000000007LL;
constexpr i64 INF64 = MOD * MOD;

const vec<vec<pi64>> kPieces{
    vec<pi64>
    {pi64{0, 0},},
    {pi64{0, 0},{0, 1},},
    {pi64{0, 0},{1, 0},},
};

i64
dfs(const i64 r, const i64 c, vec<vec<bool>>& G, const i64 R, const i64 C, const i64 A, const i64 B)
{
    let auto& INR = [R, C](const i64 u, const i64 v)
    {
        return 0 <= u && u < R && 0 <= v && v < C;
    };
    let auto& LIN = [C](const i64 u, const i64 v)
    {
        return u * C + v;
    };
    let auto& LIN_INV = [C](const i64 x)
    {
        return make_pair(x / C, x % C);
    };
    let auto& FIT = [&](const vec<pi64>& piece)
    {
        for (let auto [dr, dc] : piece)
        {
            if (!INR(r + dr, c + dc))
            {
                return false;
            }
            if (G[r + dr][c + dc])
            {
                return false;
            }
        }
        return true;
    };
    if (LIN(r, c) > LIN(R - 1, C - 1))
    {
        assert(A == 0);
        assert(B == 0);
        return 1;
    }
    P("r: " << r << " c: " << c);
    let pi64 nxt(LIN_INV(LIN(r, c) + 1));
    if (G[r][c])
    {
        return dfs(nxt.first, nxt.second, G, R, C, A, B);
    }
    i64 acc = 0;
    for (i64 pi = 0; pi < kPieces.size(); ++pi)
    {
        let auto& piece = kPieces[pi];
        if (!FIT(piece))
        {
            continue;
        }
        if (pi == 0 && B == 0)
        {
            continue;
        }
        if (pi > 0 && A == 0)
        {
            continue;
        }
        for (let auto [dr, dc] : piece)
        {
            G[r + dr][c + dc] = true;
        }
        acc += dfs(nxt.first, nxt.second, G, R, C, A - (pi > 0), B - (pi == 0));
        for (let auto [dr, dc] : piece)
        {
            G[r + dr][c + dc] = false;
        }
    }
    return acc;
}

int
main()
{
    ios_base::sync_with_stdio(false);
    // fast io: see 1423K
    cin.tie(nullptr);
    cout.tie(nullptr);

    DRi64(R); DRi64(C); DRi64(A); DRi64(B);
    vec<vec<bool>> G(R, vec<bool>(C, false));
    cout << dfs(0, 0, G, R, C, A, B) << "\n";

    return 0;
}
