#include <bits/stdc++.h>
using namespace std;
int cnt;
int n, k, s;
void gao(int tk, int ts, int t) {
  int temp;
  for (int i = t; i <= ts / tk + 1; i++) {
    if (tk != 1 && (ts - i) / (tk - 1) <= n) {
      temp = i + 1;
      gao(tk - 1, ts - i, temp);
    }
    if (tk == 1 && ts >= t && ts <= n) {
      cnt++;
      return;
    }
  }
}
int main() {
  while (scanf("%d%d%d", &n, &k, &s)) {
    if (n == 0 && k == 0 && s == 0)
      break;
    else {
      if ((s / k >= n) || (k * (k - 1) / 2 > s)) {
        printf("0\n");
        continue;
      } else {
        cnt = 0;
        gao(k, s, 1);
        printf("%d\n", cnt);
      }
    }
  }
  return 0;
}
