#include <bits/stdc++.h>
using namespace std;
int ans, n, k, s;
int used[21];
void dfs(int d, int sum, int t) {
  if (sum == s && d == 0) {
    ans++;
    return;
  } else if (d == 0)
    return;
  for (int i = t + 1; i <= n; i++) {
    if (!used[i]) {
      used[i] = 1;
      dfs(d - 1, sum + i, i);
      used[i] = 0;
    }
  }
}
int main() {
  while (cin >> n >> k >> s && n) {
    memset(used, 0, sizeof(used));
    ans = 0;
    dfs(k, 0, 0);
    cout << ans << endl;
  }
  return 0;
}
