
import scala.io.StdIn

object Main extends App {
  val n= StdIn.readInt()
  val all = BigInt(10).pow(n)
  val withoutANuber = BigInt(9).pow(n)
  val withoutTwoNumber = BigInt(8).pow(n)

  val ans = all - (2 * withoutANuber - withoutTwoNumber)
  val mod = BigInt(10).pow(9) + 7
  println(ans % mod)
}





