#include <bits/stdc++.h>
const long long LL_INF = (long long)2e18 + 5;
using namespace std;
vector<long long> stone;
long long pow_of_10(long long x) {
  long long result = 1;
  for (long long i = 1; i < x + 1; i++) {
    result *= 10;
  }
  return result;
}
bool lol(long long mid, vector<long long> &ouas, long long n, long long k) {
  long long sum = 0;
  for (long long i = n - 1; i >= n / 2; i--) {
    sum += max(0LL, mid - ouas[i]);
  }
  if (sum > k) {
    return false;
  }
  return true;
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (a == b) return a;
  if (a > b) return gcd(a - b, b);
  return gcd(a, b - a);
}
bool ispalin(string second) {
  string t = second;
  reverse(second.begin(), second.end());
  if (second == t) {
    return true;
  }
  return false;
}
pair<long long, long long> countGCD(long long L, long long R, long long g) {
  L = (L + g - 1) / g;
  R = R / g;
  vector<pair<long long, long long>> ans;
  long long n = (to_string(L)).size();
  long long m = (to_string(R)).size();
  for (int i = L; i <= R; i++)
    for (int j = L; j <= R; j++)
      if (gcd(i, j) == 1) ans.push_back({i, j});
  for (long long i = 0; i < ans.size(); i++) {
    if (n == (to_string(ans[i].first)).size() &&
        m == (to_string(ans[i].second)).size()) {
      return {ans[i].first, ans[i].second};
    }
  }
  return {0, 0};
}
long long ans;
void lol(vector<vector<long long>> &dp, long long i, long long j, long long n,
         long long m) {
  if (i == n - 1 && j == m - 1 && dp[i][j] == 1) {
    ans++;
    return;
  } else if (i >= n || j >= m || i < 0 || j < 0) {
    return;
  }
  if (dp[i][j] == 1) {
    lol(dp, i + 1, j, n, m);
    lol(dp, i, j + 1, n, m);
  }
  return;
}
vector<vector<long long>> dp(1000, vector<long long>(2, 0));
long long tolve(vector<vector<long long>> &dp, long long n, long long k,
                long long d, bool yes) {
  if (n < 0) {
    return 0;
  }
  if (n == 0) {
    if (yes)
      return 1;
    else
      return 0;
  }
  if (dp[n][yes] != -1) {
    return dp[n][yes];
  }
  long long ans = 0;
  for (long long i = 1; i < k + 1; i++) {
    if (i >= d) {
      ans += tolve(dp, n - i, k, d, yes | 1);
    } else {
      ans += tolve(dp, n - i, k, d, yes);
    }
    ans %= 1000000007;
  }
  ans %= 1000000007;
  dp[n][yes] = ans % 1000000007;
  return ans;
}
long long solve() {
  long long n, k, d;
  cin >> n >> k >> d;
  for (long long i = 0; i < 1000; i++) {
    for (long long j = 0; j < 2; j++) {
      dp[i][j] = -1;
    }
  }
  cout << tolve(dp, n, k, d, 0);
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long flag = 0;
  if (flag) {
    long long t;
    cin >> t;
    while (t--) {
      solve();
    }
  } else {
    solve();
  }
  return 0;
}
