#include<bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define BIG 1000000010
#define EPS 1e-9
#define fst first
#define scd second

#define debug(x) cout<<x<<endl;
#define repi(i,x,n) for(int i=x;i<n;i++)
#define rep(i,n) repi(i,0,n)
#define repn(i,n) for(int i=n;i>=0;i--)
#define int long long



signed main(){
  cin.tie(0);	
  ios::sync_with_stdio(false);
  int n,k,s;
  while(1){
    cin>>n>>k>>s;
    if(n==0 && k==0 && s==0) break;
    int dp[25][25][160]={0};
    dp[0][0][0]=1;
    repi(i,1,n+1){
      rep(j,k+1){
	rep(l,s+1){
	  if(l-i >= 0 && j!=0) dp[i][j][l]+=dp[i-1][j-1][l-i];
	  dp[i][j][l]+=dp[i-1][j][l];
	}
      }
    }
    cout<<dp[n][k][s]<<endl;
  }
      
    

  return 0;
}

