#include <iostream>
using namespace std;

int dp[11][156][21];	//dp[????????§????????°][????????§???????¨?][????????§????????§???] = ????????????

int main() {
	int i, j, k, l;
	int m, n, s;	//max, num, sum
	
	while (cin >> m >> n >> s) {
		if (!n) break;
		for (i = 0; i <= n; i++) for (j = 0; j <= s; j++) for (k = 0; k <= m; k++) dp[i][j][k] = 0;
		dp[0][0][0] = 1;
		for (i = 0; i < n; i++) {
			for (j = 0; j <= s; j++) {
				for (k = 0; k <= m; k++) {
					for (l = k + 1; j + l <= s && l <= m; l++) {
						dp[i + 1][j + l][l] += dp[i][j][k];
					}
				}
			}
		}
		
		int ans = 0;
		for (i = 0; i <= m; i++) ans += dp[n][s][i];
		cout << ans << endl;
	}
	return 0;
}