#include <bits/stdc++.h>
using namespace std;
 


int dp[30][20][300];


int main() {
	ios_base::sync_with_stdio(false); cin.tie(0);
  dp[0][0][0] = 1;
  for (int i = 0; i < 20; ++i) {
    for (int j = 0; j <= 10; ++j) {
      for (int k = 0; k < 159; ++k) {
        dp[i + 1][j][k] += dp[i][j][k];
        dp[i + 1][j + 1][k + (i + 1)] += dp[i][j][k];
      }
    }
  }
  int n, k, s; 
  while (cin >> n >> k >> s and n) {
    cout << dp[n][k][s] << '\n';
  }
}

