#include <iostream>
#include <cstring>
#include <algorithm>

using namespace std;

int main(){
    int n,s;
    while(cin >> n >> s, n+s){
        int use[101];
        memset(use,0,sizeof(use));
        for(int i=0; i<n; i++){
            use[99-i] = 1;
        }
        int c = 0;
        do{
            int sum = 0;
            for(int i=0; i<=100; i++){
                if(use[100-i]){
                    sum += i;
                    // cout << i << " ";
                }
                if(sum > s) break;
            }
            // cout << endl;
            if(sum == s) c++;
        }while(next_permutation(use, use+100));
        cout << c << endl;
    }
}