#include using namespace std; #define all(v) v.begin(),v.end() using ll = long long; using ull = unsigned long long; using vll=vector; using vvll = vector>; ll mod=1e9+7; int main(){ ll N,D,K; cin>>N>>D>>K; vvll dp(N+1,vll(D*K+3)); dp[0][0]=1; for(int i=1;i<=N;i++){ vll rw(D*K+3); for(int j=0;j<=D*K;j++){ rw[j+1]+=rw[j]+dp[i-1][j]; } for(int j=0;j<=D*K;j++){ dp[i][j]+=rw[j]-rw[max(0ll,j-D)]; dp[i][j]%=mod; } } cout << dp[N][K] << endl; }