#include <bits/stdc++.h>
using namespace std;
long dp[25][200][30];
int n, k;
long rec(int a, int b, int c) {
  if (dp[a][b][c] >= 0) return dp[a][b][c];
  long ret = 0;
  if (a == k && b >= 0) {
    if (b == 0)
      ret = 1;
    else
      ret = 0;
  } else if (b < 0)
    ret = 0;
  else {
    for (int i = c - 1; i > 0; --i) ret += rec(a + 1, b - i, i);
  }
  return dp[a][b][c] = ret;
}
int main() {
  while (1) {
    int s;
    scanf(" %d %d %d", &n, &k, &s);
    if (n == 0) break;
    memset(dp, -1, sizeof(dp));
    printf("%ld\n", rec(0, s, n + 1));
  }
  return 0;
}
