n, k = [int(i) for i in input().split()]
mod = 1000000007
def fact(m):
res = 1
for i in range(m):
res = res * (i + 1) % mod
return res
def binpow(a, n):
res = 1
while n > 0:
if n%2 == 1:
res = res * a % mod
a = a * a % mod
n //= 2
return res
def ober(a):
return binpow(a, mod - 2)
res = fact(n + k - 1) * ober(fact(n)) * ober(fact(k - 1)) % mod
print(res)