#include <stdio.h>
long long d[11][21][156];
int main() {
	d[0][0][0] = 1;
	for (int i = 1; i <= 10; i++) {
		for (int j = 0; j < 20; j++) {
			for (int k = j + 1; k <= 20; k++) {
				for (int s = 0; s <= 155 - k; s++)
					d[i][k][s + k] += d[i - 1][j][s];
			}
		}
	}
	int N, K, S;
	while (scanf("%d%d%d", &N, &K, &S), N) {
		long long res = 0;
		for (int i = 1; i <= N; i++) res += d[K][i][S];
		printf("%lld\n", res);
	}
}