#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
 
using namespace std;

#define nmax 20
#define kmax 10
#define smax 155

int C(int n, int k, int s) {
	int count = 0;
	if( k == 0 ) {
		if( s == 0 ) return 1;
		else return 0;
	}
	for(int i = 1; i <= n; i++) {
		count += C(i - 1, k - 1, s - i);
	}
	return count;
}
 
int main(void){
   // FILE* fp_in = freopen("data.txt", "r", stdin);

	while( 1 ) {
		int n, k, s;
		cin >> n >> k >> s;
		if( n == 0 && k == 0 && s == 0 ) break;
		cout << C(n,k,s) << endl;
	}


  // while(1){}
 
   return 0;
}