#include <bits/stdc++.h>

using namespace std;

int solve(int n, int k, int s)
{
  if(n < 0 || k < 0 || s < 0) return 0;
  if(n == 0 && k == 0 && s == 0) return 1;
  return solve(n-1, k-1, s-n) + solve(n-1, k, s);
}

int main()
{
  int n, k, s;
  while(cin >> n >> k >> s, n || k || s){
    cout << solve(n, k, s) << endl;
  }
  return 0;
}