public fun readln() = readLine()!!
public fun readlnByte() = readln().toByte()
public fun readlnShort() = readln().toShort()
public fun readlnInt() = readln().toInt()
public fun readlnLong() = readln().toLong()

const val mod = (1e9 + 7).toLong()

fun main() {
    val N = readlnLong()
    var ans = (powmod(10, N) - powmod(9, N) - powmod(9, N) + powmod(8, N) ) % mod
    ans = (ans + mod ) % mod
    println("%d".format(ans))
}

fun powmod(x: Long, y: Long): Long {
    var res: Long = 1
    for (i in 0 until y) {
        res = (res * x) % mod
    }
    return res
}