import io.StdIn.{readInt, readLong}
object Main extends App {
  val n = readInt
  
  // general expression 10^n-9^n-9^n+8^n
  val divisor = 1000000000L+7L
  var num1 = 10L
  var num2 = 9L
  var num3 = 8L

  for (_ <- 1 until n) {
    num1 *= 10
    num1 %= divisor
    num2 *= 9
    num2 %= divisor
    num3 *= 8
    num3 %= divisor
  }

  println(num1-num2-num2+num3)

}