#include <iostream>

using namespace std;

int main() {
	int n, k, s;
	while ( cin >> n >> k >> s, n || k || s ) {
		int dp[11][21][200] = {0}; // dp[???????????£??????][???????????????][????¨?] = ??´????????°
		dp[0][0][0] = true;
		for (int i = 0; i < k; ++i) {
			for (int last = 0; last <= n; ++last) {
				for (int use = last+1; use <= n; ++use) {
					for (int sum = 0; sum <= 155; ++sum) {
						dp[i+1][use][sum+use] += dp[i][last][sum];
					}
				}
			}
		}
		int ans = 0;
		for (int last = 0; last <= n; ++last) {
			ans += dp[k][last][s];
		}
		cout << ans << endl;
	}
}