main = do num <- readLn :: IO Int putChar $ (concat [show a | a <- [0..]]) !! num