// 2020-07-18 10:56:41
#include<bits/stdc++.h>
#ifdef LOCAL
#include "lib/debug.hpp"
#else
#define debug(...) 1
#endif
#define ALL(a) (a).begin(), (a).end()
#define rep(i, n) REP(i, 0, (n))
#define repc(i, n) REPC(i, 0, (n))
#define REP(i, n, m) for (int i = (int)(n); i < (int)(m); i++)
#define REPC(i, n, m) for (int i = (int)(n); i <= (int)(m); i++)
#define REPCM(i, n, m) for (int i = (int)(n); i >= (int)(m); i--)
using namespace std;
using ll = long long;
using ld = long double;
using pr = pair<ll, ll>;
using vll = vector<ll>;
using vpr = vector<pr>;
template<class T> inline bool chmin(T& a, const T& b) { if (a > b) { a = b; return true; } else return false; }
template<class T> inline bool chmax(T& a, const T& b) { if (a < b) { a = b; return true; } else return false; }

const ll INF = 1e18;
void answer() {
  int n;
  cin >> n;
  vector<ll> a(n);
  rep(i, n) cin >> a[i];
  int k = n%2+1;
  vector<ll> dp(k+1, -INF);
  dp[0] = 0;
  rep(i, n) {
    vector<ll> p(k+1, -INF);
    swap(p, dp);
    repc(j, k) {
      if(j<k) chmax(dp[j+1], p[j]);
      if((i+j)%2) {
        chmax(dp[j], p[j]);
      } else {
        chmax(dp[j], p[j] + a[i]);
      }
    }
  }
  cout << dp[k] << '\n';
}
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  answer();
  return 0;
}

#include<bits/stdc++.h>
#define mo 1000000007
using namespace std;
long long read(){
    long long xx=0,flagg=1;
    char ch=getchar();
    while((ch<'0'||ch>'9')&&ch!='-')
        ch=getchar();
    if(ch=='-'){
        flagg=-1;
        ch=getchar();
    }
    while(ch>='0'&&ch<='9'){
        xx=xx*10+ch-'0';
        ch=getchar();
    }
    return xx*flagg;
}
void pus(long long xx,long long flagg){
    if(xx<0){
        putchar('-');
        xx=-xx;
    }
    if(xx>=10)
        pus(xx/10,0);
    putchar(xx%10+'0');
    if(flagg==1)
        putchar(' ');
    if(flagg==2)
        putchar('\n');
    return;
}
long long n,m,a,b,i,j,jc[200005],ny[200005],ans;
long long ksm(long long u,long long v){
	long long o=1;
	while(v){
		if(v&1)
			o=o*u%mo;
		u=u*u%mo;
		v>>=1;
	}
	return o;
}
long long C(long long u,long long v){
	return jc[u]*ny[v]%mo*ny[u-v]%mo;
}
long long Q(long long u,long long v){
	return C(u+v,v);
}
int main(){
    //freopen(".in","r",stdin);
    //freopen(".out","w",stdout);
    n=read();m=read();a=read();b=read();
    jc[0]=1;
    for(i=1;i<=n+m;i++)
   		jc[i]=jc[i-1]*i%mo;
   	ny[n+m]=ksm(jc[n+m],mo-2);
   	for(i=n+m-1;i>=0;i--)
   		ny[i]=ny[i+1]*(i+1)%mo;
   	ans=Q(n-1,m-1);
   	for(i=1;i<=b;i++)
   		ans=(ans-Q(n-a-1,i-1)*Q(a-1,m-i)%mo+mo)%mo;
   	pus(ans,2);
    return 0;
}