#include <iostream>
using namespace std;

#define N_MAX 20
#define K_MAX 10
#define S_MAX 155

int dp[N_MAX + 1][K_MAX + 1][S_MAX + 1] = {};

int main() {
  
  for (int i = 0; i <= N_MAX; i++){
    dp[i][0][0] = 1;
  }

  for (int n = 1; n <= N_MAX; n++) {
    for (int k = 1; k <= K_MAX; k++) {
      for (int s = 1; s <= S_MAX; s++) {

	dp[n][k][s] +=
	  (s - n < 0 ? 0 : dp[n-1][k-1][s-n]) +
	  dp[n - 1][k][s];
	/*
	if(n <= 2 && k <= 1 && s <= 10){
	  cout << n << ", " << k << ", " << s << ", " << dp[n][k][s] << endl;
	}
	*/
      }
    }
  }

  while( true ) {

    int n, k, s;
    cin >> n >> k >> s;
    if ( n == 0 ) break;

    cout << dp[n][k][s] << endl;

  }

  return 0;

}