#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;

int N, K, S;
ll dp[25][25][160];

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  while (cin >> N >> K >> S, N) {
    fill_n((ll*)dp, 25*15*160, 0);
    for (int i = 1; i <= N; i++) {
      dp[1][i][i] = 1;
    }
    for (int i = 1; i < K; i++) {
      for (int j = 1; j <= N; j++) {
        for (int k = i; k <= S; k++) {
          for (int l = j+1; l <= N && k+l <= S; l++) {
            dp[i+1][l][k+l] += dp[i][j][k];
          }
        }
      }
    }
    ll ans = 0;
    for (int i = 1; i <= N; i++) {
      ans += dp[K][i][S];
    }
    cout << ans << endl;
  }

  return 0;
}
