#include <iostream>
using namespace std;
#define REP(i,x) for(int i=0;i<(int)(x);i++)


int main(){
	int n,m,s,dp[21][11][160];
	while(cin >> n >> m >> s, s){
		REP(i, n+1)REP(j, m+1)REP(k, s+1) dp[i][j][k] = !(i+j+k);
		REP(i, n)REP(j, m)REP(k, s+1){
			if(j<m && k+i<s) dp[i+1][j+1][k+i+1] += dp[i][j][k];
			dp[i+1][j][k] += dp[i][j][k];
		}
		int ans=0;
		REP(i, n+1) ans+=dp[i][m][s];
		cout << ans << endl;
	}
	return 0;
}