{-# LANGUAGE BangPatterns               #-}
{-# LANGUAGE DerivingStrategies         #-}
{-# LANGUAGE FlexibleContexts           #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiWayIf                 #-}
{-# LANGUAGE RankNTypes                 #-}
{-# LANGUAGE ScopedTypeVariables        #-}
{-# LANGUAGE UndecidableInstances       #-}
import qualified Data.Vector.Unboxing         as VU
import qualified Data.Vector.Unboxing.Mutable as VUM

main :: IO ()
main = do
  n <- readLn :: IO Int

  print $ powMod 10 n - 2 * powMod 9 n + powMod 8 n


solve :: Int -> IntMod
solve !n = sum $ zipWith (*) (nCkMods n) (map (\k -> powMod 8 (n-k)) [n,(n-1)..1])


nPkMods :: Int -> [IntMod]
nPkMods !n' = scanr (\y x -> fromIntegral y * x) (fromIntegral n') [1..(n'-1)]


nCkMods :: Int -> [IntMod]
nCkMods !n = zipWith (*) (nPkMods n) (map invMod (scanr (\y x -> fromIntegral y * x) 1 [n,(n-1)..2]))


modulus :: Int
-- modulus = 10^9 + 7
modulus = 1000000007

newtype IntMod = IntMod Int deriving Eq deriving newtype VU.Unboxable

fromIntegralIntIntMod :: Int -> IntMod
fromIntegralIntIntMod n = IntMod (n `mod` modulus)
{-# RULES
"fromIntegral/Int->IntMod"
    fromIntegral = fromIntegralIntIntMod
#-}

instance Show IntMod where
  show (IntMod x) = show x

instance Num IntMod where
  IntMod x + IntMod y = IntMod ((x + y) `mod` modulus)
  IntMod x - IntMod y = IntMod ((x - y) `mod` modulus)
  IntMod x * IntMod y = IntMod ((x * y) `mod` modulus)
  fromInteger n = IntMod (fromInteger (n `mod` fromIntegral modulus))
  abs = undefined
  signum = undefined

im0 :: IntMod
im0 = 0

powMod :: IntMod -> Int -> IntMod
powMod !x 1 = x
powMod !x !k
  | even k = powMod (x * x) (k `div` 2)
  | otherwise = x * powMod (x * x) (k `div` 2)

invMod :: IntMod -> IntMod
invMod 0  = error "inverse of 0"
invMod !x = powMod x (modulus - 2)
