#include using namespace std; // modint template struct Fp { long long val; constexpr Fp(long long v = 0) noexcept : val(v % MOD) { if (val < 0) val += MOD; } constexpr int getmod() const { return MOD; } constexpr Fp operator - () const noexcept { return val ? MOD - val : 0; } constexpr Fp operator + (const Fp& r) const noexcept { return Fp(*this) += r; } constexpr Fp operator - (const Fp& r) const noexcept { return Fp(*this) -= r; } constexpr Fp operator * (const Fp& r) const noexcept { return Fp(*this) *= r; } constexpr Fp operator / (const Fp& r) const noexcept { return Fp(*this) /= r; } constexpr Fp& operator += (const Fp& r) noexcept { val += r.val; if (val >= MOD) val -= MOD; return *this; } constexpr Fp& operator -= (const Fp& r) noexcept { val -= r.val; if (val < 0) val += MOD; return *this; } constexpr Fp& operator *= (const Fp& r) noexcept { val = val * r.val % MOD; return *this; } constexpr Fp& operator /= (const Fp& r) noexcept { long long a = r.val, b = MOD, u = 1, v = 0; while (b) { long long t = a / b; a -= t * b, swap(a, b); u -= t * v, swap(u, v); } val = val * u % MOD; if (val < 0) val += MOD; return *this; } constexpr bool operator == (const Fp& r) const noexcept { return this->val == r.val; } constexpr bool operator != (const Fp& r) const noexcept { return this->val != r.val; } friend constexpr istream& operator >> (istream& is, Fp& x) noexcept { is >> x.val; x.val %= MOD; if (x.val < 0) x.val += MOD; return is; } friend constexpr ostream& operator << (ostream& os, const Fp& x) noexcept { return os << x.val; } friend constexpr Fp modpow(const Fp& r, long long n) noexcept { if (n == 0) return 1; if (n < 0) return modpow(modinv(r), -n); auto t = modpow(r, n / 2); t = t * t; if (n & 1) t = t * r; return t; } friend constexpr Fp modinv(const Fp& r) noexcept { long long a = r.val, b = MOD, u = 1, v = 0; while (b) { long long t = a / b; a -= t * b, swap(a, b); u -= t * v, swap(u, v); } return Fp(u); } }; // partition number template struct PartionNumber { vector> val; constexpr PartionNumber() {} constexpr PartionNumber(int MAX_N, int MAX_K) noexcept { init(MAX_N, MAX_K); } constexpr void init(int MAX_N, int MAX_K) noexcept { val.assign(MAX_N + 1, vector(MAX_K + 1, 0)); val[0][0] = 1; for (int n = 0; n <= MAX_N; ++n) { for (int k = 1; k <= MAX_K; ++k) { val[n][k] += val[n][k - 1]; if (n >= k) val[n][k] += val[n - k][k]; } } } constexpr mint get(long long n, long long k) const noexcept { if (n < 0 || k <= 0 || n >= val.size() || k >= val[0].size()) return 0; return val[n][k]; } }; const int MOD = 1000000007; using mint = Fp; int main() { long long N, S, K; cin >> N >> S >> K; PartionNumber pn(S, N); cout << pn.get(S - N * (N - 1) / 2 * K, N) << endl; }