#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>

#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define rep(i, n) FOR(i, 0, n);

using namespace std;

int dp[21][11][160];
int dfs(int n, int k, int s){
	if(k == 0) return s == 0; 

	int &res = dp[n][k][s];
	if(res >= 0) return res;

	res = 0;
	for(int i = n; i >= k; i--){
		res += dfs(i-1, k-1, s-i);
	}

	return res;
}

int main(){
	int n, k, s;
	memset(dp, -1, sizeof(dp));
	while(cin >> n >> k >> s, n|k|s){
		cout << dfs(n, k, s) << endl;
	}


	return 0;
}