#include using namespace std; #include namespace mp=boost::multiprecision; int main(){ long long MOD=1000000007; int N,d,K; cin>>N>>d>>K; vector> dp(N+1,vector(K+1,1)); for(int i=1;i=0){ dp[i][j]=(dp[i][j-1]+dp[i-1][j-1]-dp[i-1][j-d-1]+MOD)%MOD; }else if(j>0){ dp[i][j]=(dp[i][j-1]+dp[i-1][j-1])%MOD; }else{ dp[i][j]=0; } } } cout<<(MOD+dp[N][K]-dp[N][K-1])%MOD<