fun main(){
    val n = readLine()!!.split(" ")[0].toLong()
    var x = 1L
    var y = 2L
    var z = 1L
    for (i in 0 until n){
        x *= 10
        x %= 1000000007
        y *= 9
        y %= 1000000007
        z *= 8
        z %= 1000000007
    }

    println((x + z - y + 2 * 1000000007) % 1000000007)
}
