main = readLn >>= putStrLn . f where f n = [ (foldr (++) [] [ show x | x <- [0..60] ]) !! n ]