#include <stdio.h>

int find(int n, int k, int s){
  int ret=0;
  if(s<0)return 0;
  if(n<k)return 0;
  if(k==0)return s==0? 1:0;
  ret = find(n-1,k-1,s-n) + find(n-1,k,s);
  return ret;
}

int main(){
  int n,k,s;
  while(1){
    int ans=0;
    scanf("%d",&n);scanf("%d",&k);scanf("%d",&s);
    if(!(n+k+s))
      break;

    ans = find(n,k,s);

    printf("%d\n",ans);
  }
  return 0;
}
