MOD = 10 ** 9 + 7 N,d,K = map(int,input().split()) dp = [0] * (K + 1) dp[0] = 1 #print(0,dp) for i in range(N): dp1 = dp[:] for j in range(1,K + 1): dp1[j] += dp1[j-1] dp1[j] %= MOD #print(1, dp1) dp2 = [0] * (K + 1) for j in range(i + 1,K + 1): dp2[j] = dp1[j - 1] if j > d: dp2[j] -= dp1[j - 1 - d] dp2[j] %= MOD dp = dp2 #print(2,dp) print(dp[K])