#include <iostream>
#include <cstring>
#include <set>
#include <map>

std::map<std::pair<std::set<int>, int>, int> dp;
int func(int n, std::set<int>& used, int m){
    if(n == 0)
        return m == 0;
    
    {
        auto it = dp.find(std::make_pair(used, m));
        
        if(it != dp.end())
            return it->second;
    }
    
    int sum = 0;
    for(int i = 0; i <= 100; ++i){
        if(m - i >= 0 && !used.count(i)){
            used.insert(i);
            
            sum += func(n - 1, used, m - i);
            
            used.erase(used.find(i));
        }
    }
    
    return dp[std::make_pair(used, m)] = sum;
}

int main(){
    int n, s;
    std::set<int> used;
    while(std::cin >> n >> s, n != 0 && s != 0){
        std::cout << func(n, used, s) / 6 << std::endl;
    }
}