#include <bits/stdc++.h>
using namespace std;
int dp[21][11][160];
int dfs(int n, int k, int s) {
  if (k == 0) return s == 0;
  int &res = dp[n][k][s];
  if (res >= 0) return res;
  res = 0;
  for (int i = n; i >= k; i--) {
    res += dfs(i - 1, k - 1, s - i);
  }
  return res;
}
int main() {
  int n, k, s;
  memset(dp, -1, sizeof(dp));
  while (cin >> n >> k >> s, n | k | s) {
    cout << dfs(n, k, s) << endl;
  }
  return 0;
}
