//#define _GLIBCXX_DEBUG #include #include using namespace std; using ll = long long; using P = pair; #define rep(i, n) for (int i = 0; i < (n); i++) #define all(v) v.begin(), v.end() #define allr(v) v.rbegin(), v.rend() #define V vector template bool chmin(T &a, const T &b) {if(a > b){a = b; return true;} return false;} template bool chmax(T &a, const T &b) {if(a < b){a = b; return true;} return false;} V dx = {-1, 1, 0, 0, -1, -1, 1, 1}; V dy = { 0, 0, -1, 1, -1, 1, -1, 1}; const int mod = 1e9 + 7; int dp[20010][110]; int main () { int n, s, k; cin >> n >> s >> k; memset(dp, 0, sizeof(dp)); s -= (n-1) * n / 2 * k; if (s < 0) { cout << 0 << endl; return 0; } dp[0][0] = 1; for (int i = 0; i <= s; i++) { for (int j = 1; j <= n; j++) { if (i - j >= 0) dp[i][j] = dp[i][j-1] + dp[i-j][j]; else dp[i][j] = dp[i][j-1]; dp[i][j] %= mod; } } cout << dp[s][n] << endl; return 0; }