#include using namespace std; #define REP(i,n) for(int i=0; i<(int)(n); i++) const long long MOD = 1e9 + 7; int n, d, k; long long dp[90000+1]; long long sum[90000+1]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cin >> n >> d >> k; --n; for (int i = 1; i <= d; i++) dp[i] = 1; for (int i = 1; i <= k; i++) sum[i] = sum[i-1] + dp[i]; REP (i, n) { for (int j = 1; j <= k; j++) dp[j] = (sum[j-1] - sum[max(0,j-d-1)] + MOD) % MOD; for (int j = 1; j <= k; j++) sum[j] = sum[j-1] + dp[j]; } cout << dp[k] << endl; return 0; }