n, d, k = map(int, input().split()) mod = 10**9+7 dp = [[0]*(k+1) for i in range(n+1)] dp[0][0] = 1 from itertools import accumulate for i in range(n): cum = [0]*(k+2) for j in range(k): cum[j+1] += dp[i][j] if j+d <= k: cum[j+d+1] -= dp[i][j] else: cum[-1] -= dp[i][j] cum = list(accumulate(cum)) dp[i+1] = cum[0:k+2] print(dp[n][k]%mod)