#include <bits/stdc++.h>
using namespace std;
long long ans(long long n, long long k, long long d,
              vector<vector<long long>> &dp, bool is) {
  if (n == 0 && is)
    return 1;
  else if (n <= 0)
    return 0;
  if (dp[n][is] != -1) return dp[n][is];
  long long aa = 0;
  for (long long i = 1; i <= k; i++) {
    if (i < d) {
      aa = (aa + ans(n - i, k, d, dp, is)) % 1000000007;
    } else
      aa = (aa + ans(n - i, k, d, dp, true)) % 1000000007;
  }
  aa = aa % 1000000007;
  return dp[n][is] = aa;
}
long long solve(long long n, long long k, long long d) {
  vector<vector<long long>> dp(n + 1, vector<long long>(2, -1));
  return ans(n, k, d, dp, false);
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, k, d;
  cin >> n >> k >> d;
  cout << solve(n, k, d);
}
