N,d,K = map(int,input().split()) MOD = 10**9+7 dp = [[0 for _ in range(K+1)] for _ in range(N+1)] cum = [0]*(K+1) for j in range(1,K+1): if j<=d: dp[1][j] = 1 cum[j] = cum[j-1]+dp[1][j] for i in range(2,N+1): dum = [0]*(K+1) for j in range(2,K+1): m = min(d,j-1) dp[i][j] = (cum[j-1]-cum[j-1-m])%MOD dum[j] = (dum[j-1]+dp[i][j])%MOD cum = dum[:] print(dp[N][K])