solve [a, b] = f 0 (b-a) (a-1)
    where f n x y
            | x <= n*y  = n + 1
            | otherwise = f (n+1) x y

main = map read . words <$> getLine >>= print . f
    where f [a, b] = if b == 1 then 0 else solve [a, b]
