m :: Int
m = 1000000007

fpm :: Int -> Int -> Int
fpm a e
  | e == 0 = 1
  | odd e = p * p `mod` m * a `mod` m
  | otherwise = p * p `mod` m
  where
  p = fpm a (e `div` 2)

main :: IO ()
main = do
  n <- read <$> getLine
  putStrLn $ show $ (fpm 10 n + m - (fpm 9 n) * 2 + fpm 8 n) `mod` m
