n,k=map(int,input().split())
mod=10**9+7
f=[1]
for i in range(2*n):f+=[f[-1]*(i+1)%mod]
def comb(a,b):return f[a]*pow(f[b],mod-2,mod)*pow(f[a-b],mod-2,mod)%mod
ans=comb(2*n-1,n-1)
for i in range(n-1,k,-1):ans=(ans-comb(n,n-i)*comb(n-1,i))%mod
print(ans) n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k mod=10**9+7 mod 10**9+7 10**9 10 9 7 f=[1] f [1] 1 for i in range(2*n):f+=[f[-1]*(i+1)%mod] i range(2*n) range 2*n 2 n def comb(a,b):return f[a]*pow(f[b],mod-2,mod)*pow(f[a-b],mod-2,mod)%mod comb a a b b ans=comb(2*n-1,n-1) ans comb(2*n-1,n-1) comb 2*n-1 2*n 2 n 1 n-1 n 1 for i in range(n-1,k,-1):ans=(ans-comb(n,n-i)*comb(n-1,i))%mod i range(n-1,k,-1) range n-1 n 1 k -1 print(ans) print ans k=map(int,input().split()) map(int,input().split()) k ans=comb(2*n-1,n-1) comb(2*n-1,n-1) ans n,k=map(int,input().split()) map(int,input().split()) n def comb(a,b):return f[a]*pow(f[b],mod-2,mod)*pow(f[a-b],mod-2,mod)%mod def comb(a,b):return f[a]*pow(f[b],mod-2,mod)*pow(f[a-b],mod-2,mod)%mod comb f=[1] [1] f mod=10**9+7 10**9+7 mod
n,k=map(int,input().split())
mod=10**9+7
f=[1]
for i in range(2*n):f+=[f[-1]*(i+1)%mod]
def comb(a,b):return f[a]*pow(f[b],mod-2,mod)*pow(f[a-b],mod-2,mod)%mod
ans=comb(2*n-1,n-1)
for i in range(n-1,k,-1):ans=(ans-comb(n,n-i)*comb(n-1,i))%mod
print(ans)
