#include<iostream>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<sstream>
#include<cmath>
#include<numeric>
#include<map>
#include<stack>
#include<queue>
#include<list>
using namespace std;
int inf = 1000000000;


int main(void) {

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

    int dp[21][21][156] = {};
    dp[0][0][0] = 1;
    for(int i=1; i<=n; i++){
      for(int j=0; j<=k; j++){
        for(int l=0; l<=s; l++){
          if( l >= i && j != 0 ) dp[i][j][l] += dp[i-1][j-1][l-i];
          dp[i][j][l] += dp[i-1][j][l];
        }
      }
    }
    cout << dp[n][k][s] << endl;

  }


  return 0;
}

// EOF