mod = 10**9+7 n,d,k = map(int,input().split()) dp = [[0 for _ in range(k+1)] for _ in range(n+1)] dp[0][0] = 1 for i in range(n): for j in range(k+1): end = min(j+d,k) end -= j for p in range(end+1): dp[i+1][j+p] += dp[i][j]+1 dp[i+1][j+p] %= mod ans = dp[-1][-1] print(ans)