#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define N 20
#define K 10
#define S 155

static int c[1 << N];
static int d[1 << N];

static void
init()
{
  int i, j;
  
  for (i = 0; i < (1 << N); ++i) {
    c[i] = d[i] = 0;
    for (j = 1; j <= N; ++j) {
      if (i & (1 << (j - 1))) {
        ++c[i];
        d[i] += j;
      }
    }
  }
}

main()
{
  int n, k, s;
  int i;

  init();
  for (;;) {
    int rval = 0;
    
    scanf("%d%d%d", &n, &k, &s);
    if (n == 0 && k == 0 && s == 0) break ;
    
    for (i = 0; i < (1 << n); ++i) {
      rval += !!(c[i] == k && d[i] == s);
    }
    printf("%d\n", rval);
  }

  return EXIT_SUCCESS;
}