#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long N = 2e5 + 3;
long long fun(long long n, long long k) {
  vector<long long> dp(n + 1, 0);
  dp[0] = 1;
  for (long long i = 1; i <= n; ++i) {
    for (long long j = 1; j <= k; ++j) {
      if (i >= j) dp[i] = (dp[i] + dp[i - j]) % MOD;
    }
  }
  return dp[n];
}
void solve() {
  long long n, k, d;
  cin >> n >> k >> d;
  long long ans1 = fun(n, k);
  long long ans2 = fun(n, d - 1);
  long long ans = (ans1 - ans2 + MOD) % MOD;
  cout << ans << endl;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  for (long long i = 0; i < t; ++i) {
    solve();
  }
  return 0;
}
