#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  while (true) {
    int n, k, s;
    cin >> n >> k >> s;
    if (n == 0 and k == 0 and s == 0) {
      break;
    }
    if (s < n) {
      cout << 0 << endl;
      continue;
    }
    vector<vector<int>> dp(n + 1, vector<int>(s + 1, 0));
    for (int i = 1; i <= n; i++) {
      dp[i][i] = 1;
    }
    for (int l = 1; l < k; l++) {
      auto tmp = dp;
      fill(dp.begin(), dp.end(), vector<int>(s + 1, 0));
      for (int i = 0; i <= n; i++) {
        for (int j = 0; j <= s; j++) {
          if (tmp[i][j] > 0) {
            for (int m = i + 1; m <= min(n, s - j); m++) {
              dp[m][j + m] += tmp[i][j];
            }
          }
        }
      }
    }
    int sum = 0;
    for (int i = 0; i <= n; i++) {
      sum += dp[i][s];
    }
    cout << sum << endl;
  }
  return 0;
}
