N,d,K=map(int, input().split()) if K==1 or N==1 or d==1: print(1) exit() mod=10**9+7 dp=[[0 for i in range(K+1)] for j in range(N+1)] dp[0][0]=1 f=0 for i in range(K+1): if i==0: dp[1][i]=0 elif i0: dp[i+1][j]=dp[i][j-1]-dp[i][j-d-1]+dp[i+1][j-1] dp[i+1][j]%=mod else: dp[i+1][j]=dp[i][j-1]+dp[i+1][j-1] dp[i+1][j]%=mod if dp[i+1][j]<0: dp[i+1][j]=0 print((dp[-1][-1]-dp[-1][-2])%mod)