#include using namespace std; using ll = long long; using P = pair; using PL = pair; // Welcome to my source code! const int MOD = 1000000007; const int MAX_V = 100000; const int MAX_N = 305; ll dp[MAX_N + 1][MAX_V + 1]; int main() { ll n, d, k; cin >> n >> d >> k; dp[0][0] = 1; for (int i = 0; i < n; i++) { for (int j = i + 1; j <= MAX_V; j++) { dp[i + 1][j] += dp[i][j - 1]; if (j - d - 1 >= 0) dp[i + 1][j] -= dp[i][j - d - 1]; dp[i + 1][j] %= MOD; } for (int j = 1; j <= MAX_V; j++) { dp[i + 1][j] += dp[i + 1][j - 1]; dp[i + 1][j] %= MOD; } } cout << dp[n][k] << endl; }