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

int a[21][11][156];

int f(int n, int k, int s){
	if(n <= 0 || k <= 0 || s <= 0)
		return 0;
	if(a[n][k][s] == -1){
		if(k == 1){
			if(n >= s) a[n][k][s] = 1;
			else a[n][k][s] = 0;
		}else{
			a[n][k][s] = 0;
			for(int i=2; i<=n; ++i)
				a[n][k][s] += f(i-1, k-1, s-i);
		}
	}
/*	if(a[n][k][s] != 0){
		cout << n << " " << k << " " << s << "\n";
		cout << a[n][k][s] << "\n";
	}
*/	return a[n][k][s];
}

int main(){
//	cin.tie(0);
//	ios::sync_with_stdio(false);
	memset(a, -1, sizeof(a));
	while(1){
		int n, k, s;
		cin >> n >> k >> s;
		if(n+k+s==0) return 0;
		cout << f(n, k, s) << "\n";
	}
}
