#include <bits/stdc++.h>
using namespace std;
long long ans = 0;
long long k;
long long d;
long long n;
vector<vector<long long> > A;
long long dp(long long num, bool found) {
  if (A[num][found] != -1) {
    return A[num][found];
  } else {
    long long a = 0;
    for (int i = 1; i <= k; i++) {
      if (num - i < 0) continue;
      if (i >= d) {
        a += dp(num - i, true);
      } else {
        a += dp(num - i, found);
      }
      a %= 1000000007;
    }
    a %= 1000000007;
    A[num][found] = a;
    return a;
  }
}
int main() {
  cin >> n >> k >> d;
  for (int i = 0; i <= n; i++) {
    vector<long long> newvec(2, -1);
    A.push_back(newvec);
  }
  A[0][1] = 1;
  A[0][0] = 0;
  cout << dp(n, false) << endl;
  return 0;
}
