#include using namespace std; typedef long long ll; ll n,m,MOD=1e9+7,a,b,ans,bik[400001],c; ll f(ll x,ll y){ if(y==0)return 1; if(y%2==0)return f(x,y/2)*f(x,y/2)%MOD; return x*f(x,y-1)%MOD; } ll comb(ll x, ll y){ return bik[x]*f(bik[x-y],MOD-2)%MOD*f(bik[y],MOD-2)%MOD; } int main(void){ cin>>n>>m; bik[0]=1; for(ll i=1;i<=400000;i++){ bik[i]=bik[i-1]*i; bik[i]%=MOD; } //cout<>a>>b>>c; if(a==1)ans-=comb(b+c,c)*comb(2*n-b-c-1,n-c)%MOD; if(a==2)ans-=comb(b+c,c)*comb(2*n-b-c-1,n-b)%MOD; ans%=MOD; } cout<<(ans+MOD)%MOD<