fun main() {
    val n = readLine()?.toLong() ?: return
    val m = (1e9 + 7).toLong()
    if (n == 1L) {
        println("0")
        return
    }
    var a = 1L
    var o = 1L
    var t = 1L
    repeat(n.toInt()) {
        a = a * 10L % m
        o = o * 9L % m
        t = t * 8L % m
    }
    a = (a - o - o + t) % m
    if (a < 0) {
        a += m
    }
    println(a.toString())
}
