#include<iostream>
#include<algorithm>
#include<functional>

using namespace std;

typedef long long ll;

ll dp[1001][10][101];//???????????£?????°????????°????????£?????????????????§???

int main() {
	int n, s;
	while (cin >> n >> s, n+s) {
		memset(dp, 0, sizeof(dp));

		for (int j = 0; j <= n; j++) {
			for (int i = 0; i <= s; i++) {
				for (int k = 0; k <= s; k++) {
					if (i - k >= 0)
						dp[i][j][k] += dp[i - k][j - 1][k - 1];

					if (i == k && j == 1)
						dp[i][j][k]++;

					if (k > i)
						dp[i][j][k] += dp[i][j][k - 1];

//					cout << i << " " << j << " " << k << " " << dp[i][j][k] << endl;
				}
			}
		}
		int ans = 0;
		for (int i = 0; i <= s; i++) {
			ans += dp[s][n][i];
		}
		cout << ans << endl;
	}
	return 0;
}