#include <bits/stdc++.h>
#define REP(i, a, n) for(ll i = ((ll) a); i < ((ll) n); i++)
using namespace std;
typedef long long ll;

ll N, M, S;

ll dfs(ll n, ll m, ll s) {
  if(s > S) return 0;
  if(m == M) return s == S;

  ll ret = 0;
  REP(i, n, N + 1) ret += dfs(i + 1, m + 1, s + i);
  return ret;
}

int main(void) {
  while(cin >> N >> M >> S, N && M && S) cout << dfs(1, 0, 0) << endl;
}
