n,k=map(int,input().split())
m=10**9+7

k=min(k,n-1)
t,c,h=1,1,1
for i in range(1,k+1):
  p=pow(i,m-2,m)
  c=(c*(n-i+1)* p)%m
  h=(h*(n-i)  * p)%m
  t=(t+c*h)%m

print(t%m) n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k m=10**9+7 m 10**9+7 10**9 10 9 7 k=min(k,n-1) k min(k,n-1) min k n-1 n 1 t,c,h=1,1,1 t 1 c 1 h 1 for i in range(1,k+1):
  p=pow(i,m-2,m)
  c=(c*(n-i+1)* p)%m
  h=(h*(n-i)  * p)%m
  t=(t+c*h)%m i range(1,k+1) range 1 k+1 k 1 p=pow(i,m-2,m) p pow(i,m-2,m) pow i m-2 m 2 m c=(c*(n-i+1)* p)%m c (c*(n-i+1)* p)%m c*(n-i+1)* p c*(n-i+1) c n-i+1 n-i n i 1 p m h=(h*(n-i)  * p)%m h (h*(n-i)  * p)%m h*(n-i)  * p h*(n-i) h n-i n i p m t=(t+c*h)%m t (t+c*h)%m t+c*h t c*h c h m print(t%m) print t%m t m t=(t+c*h)%m (t+c*h)%m t k=map(int,input().split()) map(int,input().split()) k k=min(k,n-1) min(k,n-1) k h=1,1,1 1 h c=(c*(n-i+1)* p)%m (c*(n-i+1)* p)%m c m=10**9+7 10**9+7 m t,c,h=1,1,1 1 t n,k=map(int,input().split()) map(int,input().split()) n p=pow(i,m-2,m) pow(i,m-2,m) p c,h=1,1,1 1 c h=(h*(n-i)  * p)%m (h*(n-i)  * p)%m h
n,k=map(int,input().split())
m=10**9+7

k=min(k,n-1)
t,c,h=1,1,1
for i in range(1,k+1):
  p=pow(i,m-2,m)
  c=(c*(n-i+1)* p)%m
  h=(h*(n-i)  * p)%m
  t=(t+c*h)%m

print(t%m)
