#include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef pair P; const ll mod = 1000000007; const int inf = 1e9; const long long INF = 1LL << 60; ll dp[310][90400]; int main() { int n,d,m; cin >> n >> d >> m; dp[0][0] = 1; for(int i = 0; i <= n; i++){ for(int j = 0; j <= m; j++){ for(int k = 1; k <= d; k++){ dp[i+1][j+k] += dp[i][j]; dp[i+1][j+k] %= mod; } } } cout << dp[n][m]; }