n, k = map(int, input().split())
c1 = 1
c2 = 1
mod = 10**9+7
ans = 0

for i in range(min(n, k+1)):
  ans += c1 * c2
  c1 *= (n-i) * pow(i+1, mod-2, mod)
  c1 %= mod
  c2 *= (n-i-1) * pow(i+1, mod-2, mod)
  c2 %= mod

print(ans%mod) n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k c1 = 1 c1 1 c2 = 1 c2 1 mod = 10**9+7 mod 10**9+7 10**9 10 9 7 ans = 0 ans 0 for i in range(min(n, k+1)):
  ans += c1 * c2
  c1 *= (n-i) * pow(i+1, mod-2, mod)
  c1 %= mod
  c2 *= (n-i-1) * pow(i+1, mod-2, mod)
  c2 %= mod i range(min(n, k+1)) range min(n, k+1) min n k+1 k 1 ans += c1 * c2 ans c1 * c2 c1 c2 c1 *= (n-i) * pow(i+1, mod-2, mod) c1 (n-i) * pow(i+1, mod-2, mod) n-i n i pow(i+1, mod-2, mod) pow i+1 i 1 mod-2 mod 2 mod c1 %= mod c1 mod c2 *= (n-i-1) * pow(i+1, mod-2, mod) c2 (n-i-1) * pow(i+1, mod-2, mod) n-i-1 n-i n i 1 pow(i+1, mod-2, mod) pow i+1 i 1 mod-2 mod 2 mod c2 %= mod c2 mod print(ans%mod) print ans%mod ans mod c2 *= (n-i-1) * pow(i+1, mod-2, mod) (n-i-1) * pow(i+1, mod-2, mod) c2 c1 = 1 1 c1 k = map(int, input().split()) map(int, input().split()) k ans += c1 * c2 c1 * c2 ans mod = 10**9+7 10**9+7 mod ans = 0 0 ans c1 %= mod mod c1 n, k = map(int, input().split()) map(int, input().split()) n c2 = 1 1 c2 c1 *= (n-i) * pow(i+1, mod-2, mod) (n-i) * pow(i+1, mod-2, mod) c1 c2 %= mod mod c2
n, k = map(int, input().split())
c1 = 1
c2 = 1
mod = 10**9+7
ans = 0

for i in range(min(n, k+1)):
  ans += c1 * c2
  c1 *= (n-i) * pow(i+1, mod-2, mod)
  c1 %= mod
  c2 *= (n-i-1) * pow(i+1, mod-2, mod)
  c2 %= mod

print(ans%mod)