#include <bits/stdc++.h>
using namespace std;
int const MAXA = (int)1e6 + 1;
int n, k, d;
long long memo[MAXA][2];
long long KTree(int sum, bool ok) {
  if (sum > n)
    return 0;
  else if (sum == n && ok)
    return 1;
  long long &ret = memo[sum][ok];
  if (ret != -1) return ret;
  long long ans = 0;
  for (int j = 1; j <= k; j++) {
    long long a = KTree(sum + j, j >= d || ok) % 1000000007;
    ans += a;
  }
  ret = ans;
  return ret % 1000000007;
}
int main() {
  memset(memo, -1, sizeof(memo));
  cin >> n >> k >> d;
  cout << KTree(0, 0) << endl;
}
