def f(n, s, min)
    if n == 1
        min <= s && s <= 100 ? 1 : 0
    else
        d = n * (n-1) / 2
        ([min, s-100*(n-1)+(n-1)*(n-2)].max..[100, (s-d)/n].min)
            .map{|x| f(n-1, s-x, x+1)}
            .inject(0, :+)
    end
end

module Memoizable
    def memoize(name)
        original = "__original_#{name}__"
        ([Class, Module].include?(self.class) ? self : self.class).class_eval {
            alias_method(original, name)
            private(original)
            cache = {}
            define_method(name){|*args|
                cache[args] ||= send(original, *args)
            }
        }
    end
end

include Memoizable
memoize :f

loop {
    n, s = gets.split.map(&:to_i)
    break if n == 0
    p f(n, s, 0)
}