#include<iostream>

using namespace std;
#define reps(i,f,n) for(int i = f; i <= n; ++i)
#define rep(i,n) reps(i,0,n-1)

//[cnt][sum]
int dp[16][256];
const int INF = 1e8;

int main(void){
  int to, c, s;
  while(1){
    cin >> to >> c >> s;
    if(to == 0)break;
    rep(i,16)rep(j,256)dp[i][j] = 0;
    dp[0][0] = 1;
    reps(i,1,to){
      for(int j = c-1; j >= 0; --j){
        reps(k,0,s){
          if(dp[j][k] != 0 && k + i <= s){
            dp[j+1][k + i] += dp[j][k];
          }
        }
      }
    }
    cout << dp[c][s] << endl;
  }
  return 0;
}