def f(step,count): if count==0: if step==0: return 1 else: return 0 if not count<=step<=d*count: return 0 if (step,count) in Memo: return Memo[(step,count)] X=0 for x in range(1,d+1): X+=f(step-x,count-1) X%=Mod Memo[(step,count)]=X return X N,d,K=map(int,input().split()) Mod=10**9+7 Memo={} print(f(K,N))