# 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) for j in range(K+1): temp[j]=sum(dp[max(j-d,0):j]) dp=temp[:] print(dp[-1]%(10**9+7))