import java.io.BufferedReader
import java.io.BufferedWriter

fun main() = Case().exec(::solve)
//fun main() = TestExecutor.assert(testCase) { Case(it.r, it.w).exec(::solve) }

/** https://atcoder.jp/contests/abc178/tasks/abc178_c **/
fun solve(c: Case) {
    val n = c.long().toInt()
    var last = listOf(ModInt(8), ModInt(1), ModInt(1), ModInt(0))
    repeat(n - 1) {
        val next = listOf(
            last[0] * ModInt(8),
            last[0] + (last[1] * ModInt(9)),
            last[0] + (last[2] * ModInt(9)),
            last[1] + last[2] + (last[3] * ModInt(10))
        )
        last = next
    }
    c.println(last[3].v.toString())
}

class ModInt(var v: Long) {
    companion object {
        const val MOD = 1000000007L
    }

    override operator fun equals(other: Any?) = other != null && other is ModInt && v == other.v
    override fun hashCode() = v.hashCode()
    override fun toString() = "ModInt($v)"

    operator fun plus(o: ModInt): ModInt = ModInt(v).also { it += o }
    operator fun minus(o: ModInt): ModInt = ModInt(v).also { it -= o }
    operator fun times(o: ModInt): ModInt = ModInt(v).also { it *= o }
    operator fun div(o: ModInt): ModInt = ModInt(v).also { it /= o }

    operator fun plusAssign(o: ModInt) {
        v += o.v; if (v > MOD) v -= MOD
    }

    operator fun minusAssign(o: ModInt) {
        v -= o.v; if (v < 0) v += MOD
    }

    operator fun timesAssign(o: ModInt) {
        v = v * o.v % MOD
    }

    operator fun divAssign(o: ModInt) {
        v = v * o.v.inv() % MOD
    }

    fun inv(): ModInt {
        var (g, x, y, r) = listOf(MOD, 0L, 1L, v)
        while (r != 0L) {
            val q = g / r
            g %= r
            g = r.also { r = g }
            x -= q * y
            x = y.also { y = x }
        }
        return ModInt(if (x < 0) x + MOD else x)
    }
}

class Case(
    private val input: BufferedReader = System.`in`.bufferedReader(),
    private val out: BufferedWriter = System.out.bufferedWriter()
) {
    fun exec(fn: (Case) -> Unit) = input.use { out.use { execInThread(fn) } }
    private fun execInThread(fn: (Case) -> Unit) =
        Thread(null, { fn(this) }, "solve", 64 * 1024 * 1024)
            .apply { setUncaughtExceptionHandler { _, e -> e.printStackTrace(); kotlin.system.exitProcess(1) } }
            .apply { start() }.join()

    fun println(c: CharSequence?) = out.appendln(c)
    fun string(): String = input.readLine().trimEnd()
    fun long(): Long = input.readLine().toLong()
    fun intList(): List<Int> = input.readLine().split(" ").map { it.toInt() }
    fun longList(): List<Long> = input.readLine().split(" ").map { it.toLong() }
}