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

// n ??\????????´??°???k????????£????????????s??????????????????????????????????????????

int main() {
    int N, K, S;
    while (cin >> N >> K >> S and (N or K or S)) {
        int dp[30][30][300];
        fill(dp[0][0], dp[30][0], 0);
        dp[0][0][0] = 1;
        for (int i=1; i<=N; ++i) {
            for (int j=0; j<=K; ++j) {
                for (int k=0; k<=S; ++k) {
                    if ( k - i >= 0 and j != 0 ) dp[i][j][k] += dp[i-1][j-1][k-i];
                    dp[i][j][k] += dp[i-1][j][k];
                }
            }
        }
        cout << dp[N][K][S] << endl;
    }
}