#include <cstdio>

#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

typedef long long ll;

int main(){
	static ll dp[102][1001][10]; // [next number][sum][# of used numbers]
	dp[0][0][0]=1;
	rep(i,101) rep(s,1001) rep(n,10) {
		// use i
		if(s+i<=1000 && n+1<=9) dp[i+1][s+i][n+1]+=dp[i][s][n];
		// don't use i
		dp[i+1][s][n]+=dp[i][s][n];
	}

	for(int n,s;scanf("%d%d",&n,&s),n;) printf("%lld\n",dp[101][s][n]);

	return 0;
}