#include using namespace std; #define endl "\n" typedef long long ll; const int mod = 1e9 + 7; ll a[101][20010], l[101][20010]; int n, s, k; int f(int n, int s) { if (l[n][s]++) return a[n][s]; if (n == 0) return !s; return a[n][s] = (f(n - 1, s) + (s < n ? 0 : f(n, s - n))) % mod; } void solved() { memset(l, 0, sizeof l); memset(a, 0, sizeof a); cin >> n >> s >> k; if (n * (n - 1) / 2 * k > s) { cout << 0 << endl; return; } s -= n * (n - 1) / 2 * k; cout << f(n, s) << endl; } int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); /*int t = 1; cin >> t; while (t--)*/ solved(); return 0; }