#include <stdio.h>
#include <cmath>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>

using namespace std;

void func(int n,int k, int s){
	int dp[k+1][n+1][s+1];
	for(int a = 0; a < k+1; a++){
		for(int b = 0; b < n+1; b++){
			for(int c = 0; c < s+1; c++)dp[a][b][c] = 0;
		}
	}

	for(int i = 1; i <= n; i++){
		dp[1][i][i] = 1;
	}

	for(int i = 2; i <= k; i++){
		for(int k = 1; k <= n; k++){
			for(int a = 1; a <= k-1; a++){
				for(int p = k; p <= s; p++){
					dp[i][k][p] += dp[i-1][a][p-k];
				}
			}
		}
	}

	int ans;

	ans = 0;
	for(int i = 0; i <= n; i++)ans += dp[k][i][s];

	printf("%d\n",ans);

}

int main(){

	int n,k,s;

	while(true){
		scanf("%d %d %d",&n,&k,&s);
		if(n == 0 && k == 0 && s == 0)break;

		func(n,k,s);
	}

    return 0;
}