mod = 10**9+7 n, k = map(int, input().split()) mod = 10**9+7 dp = [1]*(k+2) tmp = [0]*(k+2) for i in range(1, n+1): for j in range(k+1): dp[j+1] = (dp[j+1] + dp[j]) % mod tmp[j] = dp[j] if j-i+1 > 0: tmp[j] = (tmp[j] - dp[j-i]) % mod dp, tmp = tmp, dp print(dp[k])