// AtCoder template // sabaより胡蝶しのぶさんの方が可愛いのではないか? #include using namespace std; typedef long long ll; #define rep(i,n) for(int i = 0; i < n; ++i) ll dp[301][90001]; int main(){ cin.tie(0); ios::sync_with_stdio(false); const ll MOD = 1e9 + 7; int n,d,k; cin >> n >> d >> k; dp[0][0] = 1LL; rep(i,n){ // i回目の行動 vector dpsum(k+2,0LL); rep(j,k) dpsum[j+1] = (dpsum[j] + dp[i][j]) % MOD; rep(j,k) dp[i+1][j+1] = (dpsum[j+1]-dpsum[max(0,j-d+1)] + MOD) % MOD; } cout << dp[n][k] << endl; }