#include <stdio.h>
int dp[21][11][156];
int main(void)
{
    int n, k, s;
    dp[0][0][0]=1;
    for(n=1;n<=20;++n) {
        dp[n][0][0]=1;
        for(k=1;k<=10;++k) for(s=1;s<=155;++s)
            dp[n][k][s]=(n<=s?dp[n-1][k-1][s-n]:0)+dp[n-1][k][s];
    }
    while (scanf("%d%d%d", &n, &k, &s), n)
        printf("%d\n", dp[n][k][s]);
    return 0;
}