#include <iostream>
#include <vector>

using namespace std;

int main() {
	int n, k, s;

	while (cin >> n >> k >> s) {
		if (n == 0 && k == 0 && s == 0) {
			break;
		}

		vector< vector< vector<long long int> > > dp(n + 1, vector< vector<long long int> >(k + 1, vector<long long int>(s + 1, 0)));
		for (int i = 0; i <= n; i++) {
			dp[i][0][0] = 1;
		}
		for (int i = 1; i <= k; i++) {
			for (int j = 1; j <= n; j++) {
				for (int kk = 1; kk <= s; kk++) {
					dp[j][i][kk] += dp[j - 1][i][kk];
					if (kk - j >= 0) {
						dp[j][i][kk] += dp[j - 1][i - 1][kk - j];
					}
				}
			}
		}
		cout << dp[n][k][s] << endl;
	}
	return 0;
}