/*
    I love the sound you make when you shut up.
*/
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace __gnu_pbds;
/*-------typedefs------*/
template<class T> using ordered_set = tree<T, null_type , less<T> , rb_tree_tag , tree_order_statistics_node_update> ;
using ll = long long;
using pi = pair<int, int>;
/*-----in and out--------*/
#define pf(a) cout << a << endl
#define forIn(arr, num) for(int i = 0; i < num; i++) cin >> arr[i];
#define vpnt(ans) for(int i = 0; i < int(ans.size()); i++) cout << ans[i] << (i + 1 < int(ans.size()) ? ' ' : '\n');
/*---useful defines------*/
#define sz(x) (int)(x).size()
#define pb push_back
#define mem(a, b) memset(a,(b), sizeof(a))
#define ff first
#define ss second
#define all(x) x.begin(), x.end()
/*----- the binary answer of life-----*/
#define no cout << "NO" << endl
#define yes cout << "YES" << endl
/*---checking and pushing-----*/
template<class T> bool ckmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
template<class T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }
/*---- FAST I/O and file read ---*/
void go() {
    ios_base::sync_with_stdio(0);cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
#endif
}
/*-------- test-case stuff--------------*/
#define ssolve solve();
#define msolve int T;cin >> T;while(T--) {solve();}
#define mcsolve int T;cin >> T;for(int tt = 1;tt <= T;tt++) {cout << "Case #" << tt << ": ";solve();}
/*-------- movement in a 2D array ------*/
const int d4i[4]={-1, 0, 1, 0}, d4j[4]={0, 1, 0, -1};
const int d8i[8]={-1, -1, 0, 1, 1, 1, 0, -1}, d8j[8]={0, 1, 1, 1, 0, -1, -1, -1};
/*----------------------------------------------------------------*/
const int MOD = 1e9 + 7;
const int N = 2e5 + 5;
/*-------------- Push your limits here ---------------------------*/
int h, w, ans;
void dfs(int i, int bit, int a, int b) {
    if(i == h * w) {
		ans++;
		return;
	}

	if(bit & 1 << i) dfs(i + 1, bit, a, b);
	if(b) dfs(i + 1, bit | 1 << i, a, b - 1);
	
    if(a) {
		if((i % w) != (w - 1) && ~bit & 1 << (i + 1)) dfs(i + 2, bit | 1 << i | 1 << (i + 1), a - 1, b);
		if((i + w) <= (h * w) && ~bit & 1 << (i + w)) dfs(i + 1, bit | 1 << i | 1 << (i + w), a - 1, b);
	}
}

void solve() {
    int a, b;
    cin >> h >> w >> a >> b;
    ans = 0;
    dfs(0, 0, a, b);
    pf(ans);
}

int main() {
    go();
    ssolve
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
using ll = long long;

ll solve() {
    ll H, W, A, B;
    cin >> H >> W >> A >> B;
    ll ans = 0;
    ll a = A, b = B;
    vector<vector<int>> u(H, vector<int>(W));
    auto dfs = [&](auto self, int h, int w) -> void {
        while ( u[h][w] > 0 ) {
            if ( w < W-1 ) {
                w++;
            } else if ( h < H-1 ) {
                h++;
                w = 0;
            } else {
                ans++;
                return;
            }
        }
        if ( u[h][w] == 0 && b > 0 ) {
            u[h][w] = 1;
            b--;
            self(self, h, w);
            b++;
            u[h][w] = 0;
        }
        if ( w < W-1 && u[h][w] == 0 && u[h][w+1] == 0 && a > 0 ) {
                u[h][w] = 2;
                u[h][w+1] = 2;
                a--;
                self(self, h, w);
                a++;
                u[h][w] = 0;
                u[h][w+1] = 0;
        }
        if ( h < H-1 && u[h][w] == 0 && u[h+1][w] == 0 && a > 0 ) {
                u[h][w] = 3;
                u[h+1][w] = 3;
                a--;
                self(self, h, w);
                a++;
                u[h][w] = 0;
                u[h+1][w] = 0;
        }
    };
    dfs(dfs,0,0);

    return ans;
}

int main() {
    auto ans = solve();
    cout << ans << "\n";
    return 0;
}