import java.util.*
import kotlin.math.acos
import kotlin.math.cos
import kotlin.math.round
import kotlin.math.sin

fun main(args: Array<String>) {
    val n = readLong()
    val mod = 1000000007L

    var ans = (10L.powMod(n, mod) + 8L.powMod(n, mod) - 9L.powMod(n, mod) - 9L.powMod(n, mod)) % mod
    if (ans < 0) ans += mod
    println(ans)
}

// read
fun readString() = readLine()!!
fun readInt() = readLine()!!.toInt()
fun readLong() = readLine()!!.toLong()
fun readStringList() = readLine()!!.split(" ")
fun readIntList() = readLine()!!.split(" ").map(String::toInt)
fun readLongList() = readLine()!!.split(" ").map(String::toLong)

fun Long.powMod(k: Long, mod: Long): Long {
    var r = 1L
    var n = this
    var kk = k
    while (kk > 0) {
        if (kk and 1 == 1L) {
            r = (r * n) % mod
        }
        n = (n * n) % mod
        kk = kk shr 1
    }
    return r
}