main :: IO () main = do n <- readLn :: IO Int print $ solver n solver :: Int -> Int solver 1 = 3 solver n = 9 * (solver (n - 1)) + 8 + 10 ^ (n - 1)