#include using namespace std; int const mod = 1000000007; int N,d,K; int dp[310][90010] = {}; int sum[90010] = {}; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); cin >> N >> d >> K; dp[0][1] = 1; for(int i=1; i<=N; ++i) { for(int j=1; j<=K+1; ++j) sum[j] = (sum[j - 1] + dp[i - 1][j]) % mod; for(int j=1; j<=K+1; ++j) { dp[i][j] = (sum[j - 1] - sum[max(j - d - 1, 0)]) % mod; dp[i][j] = (dp[i][j] + mod) % mod; } } cout << dp[N][K + 1] << '\n'; }