# coding: utf-8 # Your code here! N,d,K=map(int,input().split()) dp=[0]*(K+1) dp[0]=1 for i in range(N): temp=[0]*(K+1) wa=dp[0] for j in range(1,K+1): #sumとってたやば temp[j]=sum(dp[max(j-d,0):j]) wa+=dp[j] if j>=d: wa-=dp[j-d] dp=temp[:] print(dp[-1]%(10**9+7))