#include <bits/stdc++.h>
// clang-format off
using namespace std; using ll = long long; using ull = unsigned long long; using pll = pair<ll,ll>; const ll INF = 4e18;
void print0() {}
template<typename Head,typename... Tail> void print0(Head head,Tail... tail){cout<<fixed<<setprecision(15)<<head;print0(tail...);}
void print() { print0("\n"); }
template<typename Head,typename... Tail>void print(Head head,Tail... tail){print0(head);if(sizeof...(Tail)>0)print0(" ");print(tail...);}
// clang-format on

ll all;
vector<vector<vector<ll>>> memo;
ll h, w, a, b;
ll bit(ll i, ll j) {
    return 1ULL << (i * w + j);
}
bool empty(ll stat, ll i, ll j){
    if (i >= h) return false;
    if (j >= w) return false;
    if(stat & bit(i,j)) return false;
    return true;
}
ll dfs(ll stat, ll full, ll half, ll bi, ll bj) {
    if (full < 0 || half < 0) return 0;
    if (stat == all - 1) return 1;
    if (memo[stat][full][half] != -INF) return memo[stat][full][half];

    // 常に一番左上に置く
    ll ti = -1;
    ll tj = -1;
    for (ll j = bj; j < w; j++) {
        if(empty(stat,bi,j)){
          ti=bi;
          tj=j;
          break;
        }
    }
    for (ll i = bi+1; i < h; i++) {
        if (ti >= 0) break;
        for (ll j = 0; j < w; j++) {
            if (empty(stat,i,j)) {
                ti = i;
                tj = j;
                break;
            }
        }
    }
    return memo[stat][full][half] =
      dfs(stat | bit(ti,tj), full, half - 1, ti, tj) +
      (empty(stat,ti+1,tj) ? dfs(stat | bit(ti+1,tj) | bit(ti,tj), full - 1, half, ti, tj) : 0) +
      (empty(stat,ti,tj+1) ? dfs(stat | bit(ti,tj+1) | bit(ti,tj), full - 1, half, ti, tj) : 0);
}
int main() {
    cin >> h >> w >> a >> b;
    all = 1ll << (h * w);
    memo.resize(all, vector<vector<ll>>(a + 1, vector<ll>(b + 1, -INF)));
    print(dfs(0, a, b, 0, 0));
}

#include<bits/stdc++.h>
using namespace std;
#define debug printf("%d %s\n",__LINE__,__FUNCTION__);fflush(stdout)
using ll=long long;using i64=long long;using db=double;
using u32=unsigned int;using u64=unsigned long long;using db=double;
using pii=pair<int,int>;using vi=vector<int>;
using qi=queue<int>;using pqi=priority_queue<int>;using si=set<int>;
#define pb push_back
#define mk make_pair
#define ins insert
#define era erase
#define fi first
#define se second
#define lowbit(x) x&-x
#define ALL(a) a.begin(),a.end()
const int INF=0x3f3f3f3f;
const ll INFLL=0x3f3f3f3f3f3f3f3f;
const double PI=acos(-1.0);
template<class T>inline bool chkmin(T&a,T b){return b<a?a=b,true:false;}
template<class T>inline bool chkmax(T&a,T b){return a<b?a=b,true:false;}
int _w,_t;FILE* _f;

const int N=1<<16;
int h,w,a,b,mx,cnt;
ll f[2][N][17];

void solve(){
    scanf("%d%d%d%d",&h,&w,&a,&b);
    if(h<w){
        swap(h,w);
    }
    mx=1<<w;
    f[1][mx-1][0]=1;
    for(int i=1;i<=h;i++){
        for(int j=0;j<w;j++){
            memset(f[cnt],0,sizeof f[cnt]);
            cnt^=1;
            for(int k=0;k<mx;k++){
                for(int l=0;l<=b;l++){
                    if(j&&(k>>j&1)&&!(k>>(j-1)&1)){
                        f[cnt^1][k|(1<<(j-1))][l]+=f[cnt][k][l];
                    }
                    if(!(k>>j&1)){
                        f[cnt^1][k|(1<<j)][l]+=f[cnt][k][l];
                    }
                    if((k>>j&1)&&(l<b)){
                        f[cnt^1][k][l+1]+=f[cnt][k][l];
                    }
                    if((k>>j&1)){
                        f[cnt^1][k^(1<<j)][l]+=f[cnt][k][l];
                    }
                }
            }
        }
    }
    printf("%lld\n",f[cnt^1][mx-1][b]);
}

int main(){
    #ifdef MULTI_CASES
    _w=scanf("%d",&_t);while(_t--)
    #endif
    solve();
    return 0;
}