#include using namespace std; const int MOD = 1e9 + 7; int n, s, k; int dp[20001]; int main() { cin >> n >> s >> k; int S = s - k * n * (n - 1) / 2; if (S < 0){ cout << 0 << endl; return 0; } dp[0] = 1; for (int i = 0; i < n; i++){ int ds = n - i; for (int s = 0; s + ds <= S; s++){ dp[s + ds] += dp[s]; dp[s + ds] %= MOD; } } cout << dp[S] << endl; }