#include <bits/stdc++.h>
using namespace std;
void chmax(long long& a, long long b) {
  if (a < b) a = b;
}
void chmin(long long& a, long long b) {
  if (a > b) a = b;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long exp(long long first, long long n, long long mod) {
  long long result = 1;
  while (n) {
    if (n & 1) result = (result * first) % mod;
    first = (first * first) % mod;
    n >>= 1;
  }
  return result;
}
const long long M = 1e9 + 7;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, k, d;
  cin >> n >> k >> d;
  if (d > n) {
    cout << 0 << "\n";
    return 0;
  }
  long long dp[n + 1][2];
  memset(dp, 0, sizeof(dp));
  dp[0][0] = 1;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= k; j++) {
      if (i - j < 0) break;
      if (j < d)
        dp[i][0] = (dp[i][0] + dp[i - j][0]) % M;
      else
        dp[i][1] = (dp[i][1] + dp[i - j][0]) % M;
      dp[i][1] = (dp[i][1] + dp[i - j][1]) % M;
    }
  }
  cout << dp[n][1] << "\n";
  return 0;
}
