#include #define ALL(A) (A).begin(), (A).end() #define ll long long #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } int dx[] = { 0, 1, -1, 0, 1, -1, 1, -1 }; // i<4:4way i<8:8way int dy[] = { 1, 0, 0, -1, 1, -1, -1, 1 }; const ll mod = 1e9 + 7; const ll INF = -1 * ((1LL << 63) + 1); const int inf = -1 * ((1 << 31) + 1); int dp[101][20002]; int f(int n,int s){ // K = 0 のとき n人でsを分ける方法 if(n == 0 && s == 0)return 1; if(n<=0 || s<0)return 0; if(dp[n][s]!=-1)return dp[n][s]; dp[n][s] = f(n-1,s) % mod + f(n,s-n) % mod; return dp[n][s] % mod; } int main(void){ cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(20); rep(i,101)rep(j,20002)dp[i][j] = -1; int N,S,K; cin >> N >> S >> K; S -= K*N*(N-1)/2; cout << f(N,S) % mod << endl; }