L = 100
@memo = Array.new(9) {Array.new(101) {[]}}

def solve(num, start, sum)
  return 0 if sum <= 0
  return (sum <= L) ? 1 : 0 if num == 1
  a = @memo[num - 1][start][sum]
  return a if a
  co = 0
  lim = [L, (2 * sum - num ** 2 + num) / (2 * num)].min
  (start..lim).each do |i|
    co += solve(num - 1, i + 1, sum - i)
  end
  @memo[num - 1][start][sum] = co
end
  
until (a = $<.gets.split.map(&:to_i)) == [0, 0]
  puts solve(a.first, 0, a.last)
end
