nhoStr :: String -> String nhoStr str = let w = words str a = read (w !! 0) b = read (w !! 1) in show $ nho a b nho :: Int -> Int -> Int nho a b = iter b 0 where iter i j | i == 0 = j | i < a = j + 1 | otherwise = iter (i - a) (j + 1) main = do str <- getLine putStrLn $ nhoStr str