#include<iostream>
#include<cstring>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)

int main(){
	int n,k,s;
	int dp[11][21][200];
	while(cin>>n>>k>>s,s|k|s){
		memset(dp,0,sizeof(dp));
		dp[0][0][0]=1;
		rep(i,k){
			rep(j,21){
				rep(g,s+1){
					for(int h=j+1;h<=n;h++){
						dp[i+1][h][g+h] += dp[i][j][g];
					}
				}
			}
		}
		int ans=0;
		rep(i,21)ans+=dp[k][i][s];
		cout<<ans<<endl;
	}
	return 0;
}