#include <bits/stdc++.h>
using namespace std;

#define int long long

int N, K, S;
int dp[21][11][156];

int dfs(int p, int k, int s) {
  if ( k == K ) {
    if ( s == S ) return 1;
    else return 0;
  }
  if ( dp[p][k][s] >= 0 ) return dp[p][k][s];

  int ret = 0;
  for ( int i = p+1; i <= N; i++ ) {
    ret += dfs(i, k+1, s+i);    
  }

  return dp[p][k][s] = ret;
}

signed main() {
  while ( cin >> N >> K >> S, N ) {
    fill_n(**dp, 21*11*156, -1);
    cout << dfs(0, 0, 0) << endl;    
  }
  return 0;
}

