let N =
    stdin.ReadLine()
    |> int
let Mod = 1000000007L

let rec culc i value x =
    if i=N then value
    else culc (i+1) (value*x%Mod) x

(culc 0 1L 10L) - (culc 0 1L 9L) * 2L + (culc 0 1L 8L)
|> stdout.WriteLine