N,S,K=map(int,input().split()) DP=[0]*(S+1) DP[S]=1 mod=10**9+7 for i in range(N): NDP=[0]*(S+1) rest=N-i for j in range(S+1): if i==0: if DP[j]!=0: NDP[j]+=DP[j] else: if DP[j]!=0 and j-rest*K>=0: NDP[j-rest*K]+=DP[j] NDP[j-rest*K]%=mod for j in range(S,-1,-1): if j+rest<=S: NDP[j]+=NDP[j+rest] NDP[j]%=mod DP=NDP print(DP[0])