double :: Int -> Int -> Int
double u s
  |(u - 1) + u < s = 0
  |u > s = (div (s - 1) 2) + 1
  |otherwise = (div (s - 1) 2) - (s - u) + 1

solve :: Int -> Int -> Int -> Int
solve u 2 s = double u s
solve _ 0 _ = 0
solve u n s
  |s < u = sum [solve (x - 1) (n - 1) (s - x) | x <- [(div s n)..s]]
  |otherwise = sum [solve (x - 1) (n - 1) (s - x) | x <- [(div s n)..u]]

split :: Char -> [Char] -> [[Char]]
split _ [] = [[]]
split w (h:t)
  |w == h = [] : (split w t)
  |otherwise = (h : (head (split w t))) : (tail (split w t))

chomp :: [a] -> [a]
chomp [] = []
chomp ([_]) = []
chomp (a:ar) = a : chomp ar

main = do
  input <- getContents
  mapM print $ chomp (map ((\[n, s] -> solve 100 n s).(map (\n -> (read n)::Int)).(split ' ')) $ lines input)