#include <bits/stdc++.h>
using namespace std;
long long a, b, c;
long long np;
long long ans = 0;
long long dfs(long long x, long long d) {
  d++;
  if (d < b) {
    for (long long i = x + 1; i <= a; i++) {
      np += i;
      dfs(i, d);
      np -= i;
    }
  } else {
    if (np == c) ans++;
  }
  return 0;
}
signed main() {
  while (cin >> a >> b >> c) {
    ans = 0;
    if (a == 0 && b == 0 && c == 0) break;
    for (long long i = 0; i <= a; i++) {
      np = i;
      dfs(i, 0);
    }
    cout << ans << endl;
  }
  return 0;
}
