#include using namespace std; int main() { const int64_t mod = 1000000007; int n, d, k; cin >> n >> d >> k; vector> dp(k + 1, vector(n + 1)); dp.at(0).at(0) = 1; for (int i = 1; i <= k; i++) { for (int j = 1; j <= d; j++) { for (int l = 1; l <= n; l++) { if (i < j) continue; dp.at(i).at(l) += dp.at(i - j).at(l - 1); dp.at(i).at(l) %= mod; } } } cout << dp.at(k).at(n) << endl; }