import scala.math.BigInt

object Main extends App {
  
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt()
  val mod = BigInt(math.pow(10, 9).toLong + 7)
  val all = BigInt(10).pow(n)
  val no = BigInt(9).pow(n) + BigInt(9).pow(n) - BigInt(8).pow(n)
  val ans = (all - no) % mod
  println(ans)
}