MAX_SUM = 1000
MAX_I = 100
MAX_N = 9

### global variables

$sn_cache = (0..MAX_I).map{(0..MAX_N).map{[]}}

### subroutines

def check_sum(k, n, s)
  #puts "check_sum(#{k}, #{n}, #{s})"
  ret = $sn_cache[k][n][s]
  if ret.nil?
    count = 0
    max_i = [MAX_I, s].min

    for i in (k..max_i)
      break if i >= s - i
      count += check_sum(i + 1, n - 1, s - i)
    end

    ret = $sn_cache[k][n][s] = count
  end

  #puts "(#{k}, #{n}, #{s}) = #{ret}"
  return ret
end

### main

for i in (0..MAX_I)
  $sn_cache[i][1] =
    (0...i).map{0} + (i..MAX_I).map{1} + ((MAX_I + 1)..MAX_SUM).map{0}
end
#p $sn_cache[1]

while true
  n, s = gets.chomp.split(" ").map{|s| s.to_i}
  break if n == 0 && s == 0

  puts check_sum(0, n, s)
end