#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1000000007;
const int LIMIT = 1e6;
int n, k, d;
ll dp[LIMIT][2];
void rep(ll &a, ll b) {
  a += b;
  if (a > mod) a -= mod;
}
void solve() {
  scanf("%i%i%i", &n, &k, &d);
  dp[0][0] = 1;
  for (int i = 1; i < n + 1; i++) {
    for (int j = 0; j < k + 1; j++)
      if (i - j >= 0) {
        if (j < d) {
          rep(dp[i][0], dp[i - j][0]);
          rep(dp[i][1], dp[i - j][1]);
        } else {
          rep(dp[i][1], dp[i - j][0]);
          rep(dp[i][1], dp[i - j][1]);
        }
      }
  }
  printf("%lld\n", dp[n][1]);
}
int main() { solve(); }
