fun main(args: Array<String>){

    var N = readLine()!!.toLong()

    val mod = 1000000007L

    var all =1L
    var nouse = 1L
    var oneuse = 1L



    for(i in 0 until N){
        all *= 10
        all %= mod
        nouse *= 8
        nouse %= mod
        oneuse *= 9
        oneuse %= mod

    }
    var ans = all - nouse - (oneuse - nouse)*2
    while(ans<0) ans += mod

    println(ans)
}
