#include #pragma warning(disable:4996) using namespace std; using ll = long long; const int dx[4] = { 1,0,-1,0 }, dy[4] = { 0,1,0,-1 }; int dp[101][20000]; const int M = 1e9 + 7; #define int long long signed main() { int N, S, K; cin >> N >> S >> K; dp[0][0] = 1; for (int i = 1; i <= N;i++) { for (int j = 0; j <= S - (N * (N - 1)*K / 2);j++) { if (j - i >= 0) { dp[i][j] = (dp[i - 1][j] + dp[i][j - i])%M; } else { dp[i][j] = dp[i - 1][j]%M; } } } cout << dp[N][S - ((N * (N - 1)*K) / 2)] << endl; }