#include<bits/stdc++.h>
using namespace std;
  
#define REP(i,s,n) for(int i=s;i<n;++i)
#define rep(i,n) REP(i,0,n)
#define SORT(c) sort((c).begin(),(c).end())
#define IINF INT_MAX
#define LLINF LLONG_MAX
#define DEBUG false
  
typedef long long ll;
typedef pair<int, int> ii;
 
int main(){
     
    vector<vector<vector<ll>>> ans(21, vector<vector<ll>>(11, vector<ll>(256)));
      
    REP(i, 1, 21){
        ans[i][1][i] = 1;
        REP(j, 1, 11){
            for(int k = 0; k <= 255; k++){
                ans[i][j][k] += ans[i - 1][j][k];
                if(k - i >= 0) ans[i][j][k] += ans[i - 1][j - 1][k - i];
            }
        }
    }
     
    int n, k, s;
    while(cin >> n >> k >> s, n, k, s){
        cout << ans[n][k][s] << endl;
    }
     
  
    return 0;
}