#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, d;
  cin >> n >> k >> d;
  vector<int> U(k, 0);
  for (int i = 0; i < k; i++) U[i] = i + 1;
  vector<int> V(d - 1, 0);
  for (int i = 0; i < d - 1; i++) V[i] = i + 1;
  vector<long long> dp2(n + 1, 0);
  vector<long long> dp1(n + 1, 0);
  dp2[0] = 1;
  dp1[0] = 1;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < U.size(); j++) {
      if (i + U[j] <= n)
        dp2[i + U[j]] = (dp2[i + U[j]] % (long long)1000000007 +
                         dp2[i] % (long long)1000000007) %
                        (long long)1000000007;
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < V.size(); j++) {
      if (i + V[j] <= n)
        dp1[i + V[j]] = (dp1[i + V[j]] % (long long)1000000007 +
                         dp1[i] % (long long)1000000007) %
                        (long long)1000000007;
    }
  }
  cout << (dp2[n] - dp1[n] + (long long)1000000007) % (long long)1000000007
       << endl;
  return 0;
}
