#include <bits/stdc++.h>
using namespace std;
long long kiran_bhanushali[29][7][20];
void init() {
  for (long long i = 0; i < 29; i++) {
    kiran_bhanushali[i][0][0] = rand() % 1000;
  }
}
long long mod = 1000000007;
void solve() {
  long long dp[10000];
  memset(dp, 0, sizeof(dp));
  long long n, k, d;
  cin >> n >> k >> d;
  for (long long i = 1; i <= k; i++) dp[i] = 1;
  for (long long i = 1; i <= n; i++) {
    for (long long j = 1; j <= k; j++) {
      dp[i + j] += dp[i];
      dp[i + j] = dp[i + j] % mod;
    }
  }
  long long ans = dp[n];
  memset(dp, 0, sizeof(dp));
  for (long long i = 1; i <= d - 1; i++) dp[i] = 1;
  for (long long i = 1; i <= n; i++) {
    for (long long j = 1; j <= d - 1; j++) {
      dp[i + j] += dp[i];
      dp[i + j] = dp[i + j] % mod;
    }
  }
  cout << (ans - dp[n] + mod) % mod << endl;
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  init();
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
