table :: [Int] table = [7, 8, 9, 0, 5, 6, 4, 2, 3, 1] main = do n <- readLn print $ table !! (n - 1)