#include using namespace std; const int INF = 1e9; int main(){ int n,s,k; cin >> n >> s >> k; s -= k * n * (n - 1) / 2; if (s < 0){ cout << 0 << endl; } else { vector> dp(n + 1, vector(s + 1)); dp[0][0] = 1; for (int i = 1; i <= n; i++){ for (int j = 0; j <= s; j++){ if (j - i >= 0) dp[i][j] = dp[i - 1][j] + dp[i][j - i]; else dp[i][j] = dp[i - 1][j]; } } cout << dp[n][s] << endl; } }