#include <cstdio>
#include <iostream>
#include <cstring>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
#include <set>
#define INF (1<<30)
#define mm 100005
#define clr(A) memset(A,0,sizeof(A))
using namespace std;
typedef long long LL;
int A[25][12][160];

int main()
{
    //freopen("BUAA.in","r",stdin);
    //int T;
    clr(A);
    for(int i = 0;i<=20;i++)A[i][0][0] = 1;

    for(int i = 1;i<=20;i++)
    for(int j = 1;j<=10;j++)
    for(int k = (i+1)*i/2;k>=0;k--)
    {
        A[i][j][k] = A[i-1][j][k];
        if(k>=i)A[i][j][k]+=A[i-1][j-1][k-i];
    }
    int n,k,s;
    while(~scanf("%d%d%d",&n,&k,&s) && n+k+s!=0)
    {
        printf("%d\n",A[n][k][s]);
    }
    return 0;
}