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

int dp[21][11][156] = {0};

int main(){
    int n,k,s;
    for(int i=1;i<21;++i)
            dp[i][1][i] = 1;
    for(int i=1;i<21;++i){
        for(int j=1;j<11;++j){
            for(int l=1;l<156;++l){
                dp[i][j][l] += dp[i-1][j][l];
                if(l - i > 0)
                    dp[i][j][l] += dp[i-1][j-1][l-i];
            }
        }
    }
    while(scanf("%d %d %d",&n,&k,&s), n != 0 || k != 0 || s != 0){
        printf("%d\n",dp[n][k][s]);
    }

    return 0;
}