n,k=map(int,input().split())
#階乗
F = 200005
mod = 10**9+7
fact = [1]*F
inv = [1]*F
for i in range(2,F):
    fact[i]=(fact[i-1]*i)%mod
inv[F-1]=pow(fact[F-1],mod-2,mod)
for i in range(F-2,1,-1):
    inv[i] = (inv[i+1]*(i+1))%mod

ans=1
for i in range(1,min(n,k+1)):
    comb=(fact[n]*inv[i]*inv[n-i])%mod
    h=(fact[n-1]*inv[i]*inv[n-1-i])%mod
    ans=(ans+comb*h)%mod
print(ans) n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k F = 200005 F 200005 mod = 10**9+7 mod 10**9+7 10**9 10 9 7 fact = [1]*F fact [1]*F [1] 1 F inv = [1]*F inv [1]*F [1] 1 F for i in range(2,F):
    fact[i]=(fact[i-1]*i)%mod i range(2,F) range 2 F fact[i]=(fact[i-1]*i)%mod fact[i] fact i (fact[i-1]*i)%mod fact[i-1]*i fact[i-1] fact i-1 i 1 i mod inv[F-1]=pow(fact[F-1],mod-2,mod) inv[F-1] inv F-1 F 1 pow(fact[F-1],mod-2,mod) pow fact[F-1] fact F-1 F 1 mod-2 mod 2 mod for i in range(F-2,1,-1):
    inv[i] = (inv[i+1]*(i+1))%mod i range(F-2,1,-1) range F-2 F 2 1 -1 inv[i] = (inv[i+1]*(i+1))%mod inv[i] inv i (inv[i+1]*(i+1))%mod inv[i+1]*(i+1) inv[i+1] inv i+1 i 1 i+1 i 1 mod ans=1 ans 1 for i in range(1,min(n,k+1)):
    comb=(fact[n]*inv[i]*inv[n-i])%mod
    h=(fact[n-1]*inv[i]*inv[n-1-i])%mod
    ans=(ans+comb*h)%mod i range(1,min(n,k+1)) range 1 min(n,k+1) min n k+1 k 1 comb=(fact[n]*inv[i]*inv[n-i])%mod comb (fact[n]*inv[i]*inv[n-i])%mod fact[n]*inv[i]*inv[n-i] fact[n]*inv[i] fact[n] fact n inv[i] inv i inv[n-i] inv n-i n i mod h=(fact[n-1]*inv[i]*inv[n-1-i])%mod h (fact[n-1]*inv[i]*inv[n-1-i])%mod fact[n-1]*inv[i]*inv[n-1-i] fact[n-1]*inv[i] fact[n-1] fact n-1 n 1 inv[i] inv i inv[n-1-i] inv n-1-i n-1 n 1 i mod ans=(ans+comb*h)%mod ans (ans+comb*h)%mod ans+comb*h ans comb*h comb h mod print(ans) print ans comb=(fact[n]*inv[i]*inv[n-i])%mod (fact[n]*inv[i]*inv[n-i])%mod comb ans=(ans+comb*h)%mod (ans+comb*h)%mod ans n,k=map(int,input().split()) map(int,input().split()) n h=(fact[n-1]*inv[i]*inv[n-1-i])%mod (fact[n-1]*inv[i]*inv[n-1-i])%mod h k=map(int,input().split()) map(int,input().split()) k fact = [1]*F [1]*F fact F = 200005 200005 F mod = 10**9+7 10**9+7 mod inv = [1]*F [1]*F inv ans=1 1 ans
n,k=map(int,input().split())
#階乗
F = 200005
mod = 10**9+7
fact = [1]*F
inv = [1]*F
for i in range(2,F):
    fact[i]=(fact[i-1]*i)%mod
inv[F-1]=pow(fact[F-1],mod-2,mod)
for i in range(F-2,1,-1):
    inv[i] = (inv[i+1]*(i+1))%mod

ans=1
for i in range(1,min(n,k+1)):
    comb=(fact[n]*inv[i]*inv[n-i])%mod
    h=(fact[n-1]*inv[i]*inv[n-1-i])%mod
    ans=(ans+comb*h)%mod
print(ans)