N,D,K = map(int,input().split()) DIV = 10 ** 9 + 7 dp = [0] * (K + 1) dp[0] = 1 for n in range(N): new_dp = [0] * (K + 1) for i in range(K - 1, -1, -1): if dp[i] == 0: continue for d in range(1, D + 1): if i + d > K: break new_dp[i + d] += dp[i] new_dp[i + d] %= DIV dp = new_dp print(dp[K])