#include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const ll MOD = 1000000007; ll dp[310][310 * 310]; int main() { int N, D, K; cin >> N >> D >> K; memset(dp, 0, sizeof(dp)); dp[0][1] = 1; dp[0][D + 1] = -1; for (int i = 0; i < N - 1; ++i) { ll sum = 0; ll rui = 0; for (int j = 0; j < D * N; ++j) { rui = (rui + dp[i][j]) % MOD; dp[i + 1][j + 1] = (dp[i + 1][j + 1] + rui) % MOD; if (j + D + 1 <= D * N) dp[i + 1][j + D + 1] = (dp[i + 1][j + D + 1] - rui) % MOD; } } ll ans = 0; ll rui = 0; for (int j = 0; j <= K; ++j) { rui = (rui + dp[N - 1][j]) % MOD; ans = (ans + rui) % MOD; } cout << rui << endl; return 0; }