#include using namespace std; const int MOD = 1e9 + 7; int n, s, k; int dp[101][20001]; int calc(int i, int s) { if (s < 0) return 0; if (i == n) return !s; if (~dp[i][s]) return dp[i][s]; int res = 0; for (int j = 0;; j++){ int ns = s - (n - i) * j; if (ns < 0) break; res = (res + calc(i + 1, ns)) % MOD; } return dp[i][s] = res; } int main() { cin >> n >> s >> k; int S = s - k * n * (n - 1) / 2; if (S < 0){ cout << 0 << endl; return 0; } memset(dp, -1, sizeof(dp)); cout << calc(0, S) << endl; }