import java.util.*

fun main(args: Array<String>) {
  val sc = Scanner(System.`in`)
  val n = sc.nextInt()

  val mod = 1_000_000_000 + 7

  var n10 = 1L
  for (i in 1..n) {
    n10 = n10 * 10 % mod
  }
  var n9 = 1L
  for (i in 1..n) {
    n9 = n9 * 9 % mod
  }
  var n8 = 1L
  for (i in 1..n) {
    n8 = n8 * 8 % mod
  }

  var ans = n10 - n9 - n9 + n8
  ans %= mod
  ans = (ans+mod)%mod

  println(ans)


}
