#include<bits/stdc++.h>

#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)

using namespace std;

int main(){
  int n,k,s;
  while(cin >> n >> k >> s, n|k|s ){
    int dp[k+1][s+1];
    memset(dp,0,sizeof(dp));
    dp[0][0] = 1;
    REP(value,1,n+1){
      for(int use=k-1;use>=0;use--){
	rep(cur,s+1){
	  int next = cur + value;
	  if( next <= s ) {
	    dp[use+1][next] += dp[use][cur];
	  }
	}
      }
    }
    cout << dp[k][s] << endl;
  }
  return 0;
}