#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; typedef pair P; typedef tuple T; inline bool cheak(ll x, ll y, ll xMax, ll yMax){ return x >= 0 && y >= 0 && xMax > x && yMax > y; } inline ll toInt(string s) { ll v; istringstream sin(s); sin >> v; return v; } template inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); } template inline T sqr(T x) { return x*x; } #define For(i,a,b) for(ll (i) = (a);i < (b);(i)++) #define rep(i,n) For(i,0,n) #define clr(a) memset((a), 0 ,sizeof(a)) #define mclr(a) memset((a), -1 ,sizeof(a)) #define all(a) (a).begin(),(a).end() #define sz(a) (sizeof(a)) const int dx[8] = { 1, 0, -1, 0, 1, 1, -1, -1 }, dy[8] = { 0, -1, 0, 1, -1, 1, -1, 1 }; const ll mod = 1e9 + 7; const ll INF = 1e9 + 2; int n, s, k; int dp[101][20001]; int dfs(int m, int v){ if (v > s)return 0; if (dp[m][v] != -1)return dp[m][v]; if (m == n){ if (v == s){ return dp[m][v] = 1; }else{ return dp[m][v] = 0; } } return dp[m][v] = (dfs(m+1,v) + dfs(m, v + (n - m)))%mod; } int main(){ mclr(dp); cin >> n >> s >> k; s -= k * n * (n - 1) / 2; cout << dfs(0, 0) << endl; return 0; }