public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder out = new StringBuilder();
		String line = "";
		while ((line = in.readLine()) != null) {
			int[] v = readInts(line);
			n = v[0];
			k = v[1];
			s = v[2];
			if(n == 0 && k == 0 && s == 0) break;
			dp = new long[k + 1][n + 1][s + 1];
			for (int i = 0; i <= k; i++)
				for (int j = 0; j <= n; j++)
					for (int l = 0; l <= s; l++)
						dp[i][j][l] = -1L;
			out.append(solve(0, 0, 0) + "\n");
		}
		System.out.print(out);
	}