#include <bits/stdc++.h>
using namespace std;
void add_me(long long int &a, long long int b) {
  a += b;
  if (a >= 1000000007) a -= 1000000007;
}
void sub_me(long long int &a, long long int b) {
  a -= b;
  if (a < 0) a += 1000000007;
}
struct disjointset {
  int parent[200001];
  disjointset() {
    for (int i = 1; i < 200001; i++) parent[i] = i;
  }
  int find(int x) {
    int par = parent[x];
    if (par == x) return x;
    return find(parent[x]);
  }
  void union_(int x, int y) {
    int par1 = find(x);
    int par2 = find(y);
    if (par1 == par2) return;
    parent[par2] = par1;
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int n, k, d;
  cin >> n >> k >> d;
  vector<vector<long long int>> dp(n + 1, vector<long long int>(2));
  dp[0][0] = 1;
  dp[0][1] = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= d - 1; j++) {
      if (i >= j) {
        add_me(dp[i][0], dp[i - j][0]);
        add_me(dp[i][1], dp[i - j][1]);
      }
    }
    for (int j = d; j <= k; j++) {
      if (i >= j)
        add_me(dp[i][1], ((dp[i - j][0] + dp[i - j][1])) % 1000000007);
    }
  }
  cout << dp[n][1] << endl;
}
