#include <bits/stdc++.h>
typedef long long LL;
#define SORT(c) sort((c).begin(),(c).end())

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

using namespace std;
int main(void)
{
  int nks[32][16][256];
  REP(i,32) REP(j,16) REP(k,256) nks[i][j][k]=0;
  REP(i,32) nks[i][0][0]=1;
  REP(n,32) FOR(i,1,n+1){
    for(int j=9;j>=0;--j)
      REP(k,160)
	nks[n][j+1][k+i]+=nks[n][j][k];
  }
  for(;;){
    int n,k,s;
    cin >> n >> k >> s;
    if(!n&&!k&&!s) return 0;
    cout << nks[n][k][s] << endl;
  }
}