#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <queue>
#include <functional>
#include <climits>

int count(const int n, const int k, const int sum) {
	static std::vector<std::vector<std::vector<int>>> memo(21, std::vector<std::vector<int>>(11, std::vector<int>(156, -1)));
	if (k == 0) return (sum == 0) ? 1 : 0;
	if (n == 0) return 0;
	if (sum <= 0) return 0;
	if (memo[n][k][sum] == -1) {
		memo[n][k][sum] = count(n - 1, k, sum);
		if (sum >= n) {
			memo[n][k][sum] += count(n - 1, k - 1, sum - n);
		}
	}
	return memo[n][k][sum];
}
int main() {
	while (true) {
		int n, k, s; std::cin >> n >> k >> s;
		if (n == 0) return 0;
		std::cout << count(n, k, s) << std::endl;
	}
}
