#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; // ascending order #define vsort(v) sort(v.begin(), v.end()) // descending order #define vsort_r(v) sort(v.begin(), v.end(), greater()) #define vunique(v) unique(v.begin(), v.end()) #define mp make_pair #define ts(x) to_string(x) #define rep(i, a, b) for(int i = (int)a; i < (int)b; i++) #define repm(i, a, b) for(int i = (int)a; i > (int)b; i--) #define bit(a) bitset<8>(a) typedef long long ll; typedef pair P; const ll INF = 1e18; int main(){ cin.tie(0); ios::sync_with_stdio(false); ll N, S, K; cin >> N >> S >> K; S = S - N * (N - 1) / 2 * K; ll dp[N + 1][S + 1]; ll mod = 1e9 + 7; memset(dp, 0, sizeof(dp)); dp[0][0] = 1; rep(i, 1, N + 1) rep(j, 0, S + 1) { if(j - i >= 0) dp[i][j] = (dp[i - 1][j] + dp[i][j - i]) % mod; else dp[i][j] = dp[i - 1][j]; } cout << dp[N][S] << endl; }