def main(): import sys input = sys.stdin.readline N, d, K = map(int, input().split()) mod = 1000000007 dp = [[0] * (K+1) for _ in range(N+1)] dp[0][0] = 1 for i in range(1, N+1): cs = [0] * (K+2) cs[1] = dp[i-1][0] for j in range(1, K+1): cs[j+1] = (cs[j] + dp[i-1][j])%mod for j in range(K+1): dp[i][j] = (cs[max(0, j)] - cs[max(0, j-d)])%mod print(dp[-1][-1]) if __name__ == '__main__': main()