[<AbstractClass; Sealed>]
type Math private() =

    static let Module = 1000000007L

    static let rec pownPer (a:int64) n =
        let mutable r = 1L
        for i in 1 .. n do
            r <- (r * a) % Module
        r % Module 

    static member MOD = Module
    static member PownPerMod a n  = pownPer a n


let n = stdin.ReadLine() |> int
let (ans:int64) = (Math.PownPerMod 10L n - Math.PownPerMod 9L n - Math.PownPerMod 9L n + Math.PownPerMod 8L n) % Math.MOD

((ans + Math.MOD)%Math.MOD) |> printfn "%d"

