#include <bits/stdc++.h>

#define REP(i,n) for(int i=0;i<(int)(n);i++)

using namespace std;

int main() {
  while(1) {
    int n,k,s;
    cin>>n>>k>>s;
    if(!n)break;
    vector<vector<vector<int>>> dp(k+1, vector<vector<int>>(n+1, vector<int>(s+n+1)));
    dp[0][0][0] = 1;
    REP(i,k) {
      REP(j,n+1) {
        REP(l,s)
          for(int m=j+1;m<=n;++m)
            dp[i+1][m][l+m] += dp[i][j][l];
      }
    }
    int sum = 0;
    REP(i,n+1) sum += dp[k][i][s];
    cout << sum << endl;
  }
  return 0;
}