module Main where

-- "times transformer"
type Times a = Int -> (Int, a)

-- Apply And Increase Counter
aaic :: (a -> b) -> a -> Times b
aaic f x n = (1 + n, f x)

nextYear :: Int -> Int
nextYear current = floor $ 1.01 * (fromIntegral current)

countUntil :: (a -> a) -> (a -> Bool) -> a -> Times a
countUntil f cond x n
    | cond x = (n, x)
    | otherwise = countUntil f cond (f x) (n + 1)

main :: IO ()
main = interact $ show . fst . (\n -> countUntil nextYear (>= n) 100 0) . read
