#include const int nn = 1000; const int kk = 20000; int dp[nn][kk]; using namespace std; long long PF(int n, int k){ if (dp[n][k] != -1) return dp[n][k]; int res; // P(1,2)のようなケースが来たときは n==1のケースではなく、n-k<0のケース if (n-k<0) return res = PF(n, n); else if (n==1) return res = k; else if (n==0) return res = 1; else if (k==1) return res = 1; else res = PF(n, k-1)+ PF(n-k, k); return dp[n][k] = res; } int main(){ int N, S, K; cin >> N >> S >> K; int n = S-N*(N-1)*K/2; memset(dp, -1, sizeof(dp)); if (n>=0) cout << PF(n, N)<< endl; else cout << "0" << endl; }