import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.List

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
    n <- getInt
    let a1 = powerMod 10 n
        a2 = powerMod 9 n
        a3 = powerMod 8 n
        ans = a1 `minusMod` a2 `minusMod` a2 `plusMod` a3
    print ans


moduloN :: Int
moduloN = 10 ^ 9 + 7

modN = flip mod moduloN

plusMod x y = modN $ x + y

minusMod x y | x < y = moduloN + x - y
             | otherwise = x - y

mulMod x y = modN $ x * y

powerMod x 0 = 1
powerMod x y
    | even y = mulMod t t
    | otherwise = mulMod x $ mulMod t t
    where
        t = powerMod x $ div y 2
