#include <array>
#include <iostream>
#include <vector>
using namespace std;
int main() {
    int n, k, d; if (!(cin >> n >> k >> d)) return 0;
    const int mod = 1000000007;
    vector<array<int, 2>> dp(n + 1); dp[0][0] = 1;
    for (int s = 0; s < n; ++s)
        for (int used = 0; used < 2; ++used)
            for (int w = 1; w <= k && s + w <= n; ++w) {
                int flag = used || w >= d;
                dp[s + w][flag] = (dp[s + w][flag] + dp[s][used]) % mod;
            }
    cout << dp[n][1] << '\n';
}
