#include "bits/stdc++.h" using namespace std; using ll = long long; using ull = unsigned long long; typedef pair P; typedef pair PP; const ll MOD = 1e9 + 7; const ll INF = 9e18; const double eps = -1e10; const int di[4] = { 1,0,-1,0 }, dj[4] = { 0,1,0,-1 }; #define ALL(x) (x).begin(),(x).end() #define pb push_back #define eb emplace_back #define fr first #define sc second int n, s, k; ll dp[110][20010]; int main() { cin >> n >> s >> k; for (int i = 1;i < n;i++) { s -= k * i; } if (s < 0) { cout << 0 << endl; return 0; } 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][j - i] + dp[i - 1][j]) % MOD; else dp[i][j] = dp[i - 1][j]; } } cout << dp[n][s] << endl; return 0; }