#include <iostream>
using namespace std;

using int64 = long long;

int main() {
  static int64 dp[30][20][200];
  dp[0][0][0] = 1;

  for (int i = 1; i <= 20; i++) {
    for (int j = 0; j <= 10; j++) {
      for (int sum = 0; sum <= 155; sum++) {
        dp[i][j][sum] += dp[i - 1][j][sum];
        if (j > 0 and sum - i >= 0) {
          dp[i][j][sum] += dp[i - 1][j - 1][sum - i];
        }
      }
    }
  }
  int n, k, s;
  while (cin >> n >> k >> s, n | k | s) {
    cout << dp[n][k][s] << endl;
  }
  return 0;
}