n,d,k=map(int,input().split()) mod=10**9+7 dp=[0]*(k+1) dp[0]=1 for j in range(n): t=0 for i in dp[max(0,k-d):k]: t+=i t%=mod for i in range(k,-1,-1): dp[i]=t t-=dp[i-1] if i-1-d>=0: t+=dp[i-1-d] t%=mod print(dp[-1])