val mod = (1e9 + 7).toInt()

fun main() {
  val n = readLine()!!.toLong()
  
  var res = pow(10, n)
  res = (res - pow(9, n) - pow(9, n) + mod + mod) % mod
  res = (res + pow(8, n)) % mod
  println(res)
}
 
fun pow(a:Long, n:Long):Long {
	var res = 1L
  	var a = a
  	var n = n
  	while(n > 0) {
    	if(n % 2 == 1L) res = (res * a) % mod  
      	n = n / 2
        a = (a * a) % mod
    }
  	return res
}