N,d,K=map(int,input().split()) Mod=10**9+7 X=[0]*(K+1) Y=[0]*(K+1) Y[0]=1 for _ in range(N): x=0 for i in range(K+1): X[i]=x=(x+Y[i])%Mod for i in range(K+1): if i==0: Y[i]=0 elif 1<=i<=d: Y[i]=X[i-1] else: Y[i]=(X[i-1]-X[i-d-1])%Mod print(Y[K])