#include <algorithm>
#include <numeric>
#include <map>
#include <vector>
#include <cmath>
#include <iostream>

using namespace std;

const int maxn = 22, maxk = 12, maxs = 157;
int dp[maxn][maxk][maxs];

int rec(int n, int k, int s) {
  if (k < 0) return 0;
  if (dp[n][k][s] < 0) {
	int res = 0;
	for (int i = 1; i < n; i++) {
	  res += rec(i, k-1, s-i);
	}
	dp[n][k][s] = res;
  }
  return dp[n][k][s];
}

int main() {
  fill_n(dp[0][0], maxn*maxs*maxk, -1);
  for (int n = 0; n < maxn; n++)
	dp[n][0][0] = 1;
  while (true) {
	int p, q, r;
	cin >> p >> q >> r;
	if (p == 0 && q == 0 && r == 0) break;
	cout << rec(p+1, q, r) << endl;
  }
}