import std.string;
import std.stdio;
import std.conv;
import std.algorithm;

int n,s;
int[1001][1001] dp;

int saiki(int x,int m,int item){

    if(m > s || item > n) return 0;
    else if(dp[item][m] > 0){
	writeln("CALL");
       	return dp[item][m];
    }
    else if(m == s && item == n) return 1;
    else if(x == s) return 0;
    return dp[item][m] = (saiki(x+1,m+x,item+1) + saiki(x+1,m,item));
}


void main(){

    while(true){
	dp = new int[1001][1001];
	auto ss = split(readln());
	n = to!int(ss[0]);
	s = to!int(ss[1]);
	if(n == 0 && s == 0) break;
	writeln(saiki(0,0,0));
    }
}