#include <bits/stdc++.h>
#pragma warning(disable : 4996);
const double pi = 3.14159265358979;
const double EPS = 1e-6;
const int INF = 1e9;
const int N = 1e5;
using namespace std;
int main() {
  int n, k, d;
  cin >> n >> k >> d;
  vector<vector<int>> dp(1000, vector<int>(2));
  dp[0][0] = dp[0][1] = 0;
  dp[0][0]++;
  int mod = 1e9 + 7;
  for (int i = 1; i <= n; i++) {
    dp[i][0] = dp[i][1] = 0;
    for (int j = 1; j <= k; j++) {
      if (i - j >= 0) {
        if (j < d) {
          dp[i][0] = (dp[i][0] % mod + dp[i - j][0] % mod) % mod;
          dp[i][1] = (dp[i][1] % mod + dp[i - j][1] % mod) % mod;
        } else {
          dp[i][1] = (dp[i][1] % mod + dp[i - j][0] % mod) % mod;
          dp[i][1] = (dp[i][1] % mod + dp[i - j][1] % mod) % mod;
        }
      } else
        break;
    }
  }
  cout << dp[n][1];
}
