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