#include "bits/stdc++.h" using namespace std; typedef long long int ll; typedef pair pi; typedef pair, ll > pii; vector vec; vector > vec2; ll MOD = 1000000007; ll INF = 1145141919454519; int main(){ ll N, d, K; cin >> N >> d >> K; //Nと段数 vector > dp(N+19); dp[0][0] = 1; for(ll i = 0; i < N; i++){ //更新 auto begin = dp[i].begin(), end = dp[i].end(); for (auto iter = begin; iter != end; iter++) { ll now = iter->first; ll num = iter->second; //cout << now << " "; //遷移 for(ll h = d; h > 0; h--){ //枝ヶ里 if((now + h) + (N - i - 1) * d < K) break; if(now + h <= K){ dp[i+1][now+h] += num; dp[i+1][now+h] %= MOD; } } } //cout << endl; } cout << dp[N][K] << endl; }