#include <iostream>
#include <vector>
#include <cstring>
#include <string>
#include <algorithm>
#include <iomanip>
#include <cmath>
#include <cassert>
using namespace std;
typedef long long ll;
ll dp[11][50][170];

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	int n, k, s;
	while(cin >> n >> k >> s, n + k + s) {
		memset(dp, 0, sizeof dp);

		dp[0][0][0] = 1;
		for(int i = 0; i < k; i++) {
			for(int j = 0; j <= n; j++) {
				for(int l = 0; l < s; l++) {
					if(dp[i][j][l] == 0) continue;
					for(int m = j + 1; m <= n; m++) {
						if(j + m <= s) {
							dp[i + 1][m][l + m] += dp[i][j][l];
						}
					}
				}
			}
		}

		ll sum = 0;
		for(int i = 0; i <= n; i++) {
			sum += dp[k][i][s];
		}
		cout << sum << endl;
	}
}