#include <bits/stdc++.h>
using namespace std;

int dp[200][200][200];
int dfs(int n,int k,int s){
	if( n < 0 || k < 0 || s < 0 ) return 0;
	if( n == 0 && k == 0 && s == 0) return 1;
	if( dp[n][k][s] != -1 ) return dp[n][k][s];
	int ans = dfs(n-1,k-1,s-n) + dfs(n-1,k,s);
	return dp[n][k][s] = ans;
}
int main(){
	memset(dp,-1,sizeof(dp));
	int n,k,s;
	while(cin >> n >> k >> s && n){
		cout << dfs(n,k,s) << endl;
	}
	
	
}