#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, k, d;
  cin >> n >> k >> d;
  long long int dp[n + 1][2];
  memset(dp, 0, sizeof(dp));
  dp[0][0] = 1;
  for (long long int i = 1; i < n + 1; i++) {
    for (long long int j = 1; j < k + 1; j++) {
      if (i < j) break;
      if (j < d) {
        dp[i][0] = (dp[i][0] + dp[i - j][0]) % 1000000007;
        dp[i][1] = (dp[i][1] + dp[i - j][1]) % 1000000007;
      }
      if (j >= d) {
        dp[i][1] = (dp[i][1] + dp[i - j][0]) % 1000000007;
        dp[i][1] = (dp[i][1] + dp[i - j][1]) % 1000000007;
      }
    }
  }
  cout << dp[n][1] << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
