import Control.Monad import Data.Char main :: IO () main = do n <- readLn let rd = map digitToInt $ take 190 $ concatMap show [1..] (res, c) = foldr (f n) ([], 0) rd putStr $ show c putStr "." mapM_ (putStr . show) res putStrLn "" where f n x (res, c) = (x'`mod`10:res, x'`div`10) where x' = x*n+c