import sys



def test(N):

    answer = 0

    for i in range(1, 10**N):

        s = ("%0" + str(N) +"d") % i

        if "0" in s and "9" in s:

            #print(s)

            answer += 1

    return answer



def solve(N):

    MOD = 10**9+7

    dp = [[0, 0, 0, 0] for i in range(N+1)]

    dp[0] = [1, 0, 0, 0]

    A = 0

    B = 1

    C = 2

    D = 3

    for i in range(1, N+1):

        # 0 

        dp[i][A] = (dp[i-1][A]*8) % MOD

        dp[i][B] = (dp[i-1][A]   + dp[i-1][B]*9) % MOD

        dp[i][C] = (dp[i-1][A]   + dp[i-1][C]*9) % MOD

        dp[i][D] = (dp[i-1][B]   + dp[i-1][C]    + dp[i-1][D]*10) % MOD

        #print(i, dp[i], sum(dp[i]))

    return dp[N][D]



N = int(eval(input()))

print((solve(N)))

import sys



def test(N):

    MOD = 10**9+7

    U = (pow(10, N, MOD) - 1)%MOD

    notA = (pow(9, N, MOD) - 1)% MOD

    notB = (pow(9, N, MOD) - 1)% MOD

    A = (U - notA) % MOD

    B = (U - notB) % MOD

    AnorB = (pow(8, N, MOD) - 1)%MOD

    AorB = (U - AnorB) % MOD

    AandB = (A+B-AorB) %MOD

    #print(f"{U=}, {AorB=}, {A=}, {B=}, {AnorB=}")

    return AandB





def solve(N):

    MOD = 10**9+7

    dp = [[0, 0, 0, 0] for i in range(N+1)]

    dp[0] = [1, 0, 0, 0]

    A = 0

    B = 1

    C = 2

    D = 3

    for i in range(1, N+1):

        dp[i][A] = (dp[i-1][A]*8) % MOD

        dp[i][B] = (dp[i-1][A]   + dp[i-1][B]*9) % MOD

        dp[i][C] = (dp[i-1][A]   + dp[i-1][C]*9) % MOD

        dp[i][D] = (dp[i-1][B]   + dp[i-1][C]    + dp[i-1][D]*10) % MOD

        #print(i, dp[i], sum(dp[i]))

    return dp[N][D]



N = int(eval(input()))

print((test(N)))

#print(solve(N))

import sys


def test(N):
    answer = 0
    for i in range(1, 10**N):
        s = ("%0" + str(N) + "d") % i
        if "0" in s and "9" in s:
            # print(s)
            answer += 1
    return answer


def solve(N):
    MOD = 10**9 + 7
    dp = [[0, 0, 0, 0] for i in range(N + 1)]
    dp[0] = [1, 0, 0, 0]
    A = 0
    B = 1
    C = 2
    D = 3
    for i in range(1, N + 1):
        # 0
        dp[i][A] = (dp[i - 1][A] * 8) % MOD
        dp[i][B] = (dp[i - 1][A] + dp[i - 1][B] * 9) % MOD
        dp[i][C] = (dp[i - 1][A] + dp[i - 1][C] * 9) % MOD
        dp[i][D] = (dp[i - 1][B] + dp[i - 1][C] + dp[i - 1][D] * 10) % MOD
        # print(i, dp[i], sum(dp[i]))
    return dp[N][D]


N = int(eval(input()))
print((solve(N)))

import sys


def test(N):
    MOD = 10**9 + 7
    U = (pow(10, N, MOD) - 1) % MOD
    notA = (pow(9, N, MOD) - 1) % MOD
    notB = (pow(9, N, MOD) - 1) % MOD
    A = (U - notA) % MOD
    B = (U - notB) % MOD
    AnorB = (pow(8, N, MOD) - 1) % MOD
    AorB = (U - AnorB) % MOD
    AandB = (A + B - AorB) % MOD
    # print(f"{U=}, {AorB=}, {A=}, {B=}, {AnorB=}")
    return AandB


def solve(N):
    MOD = 10**9 + 7
    dp = [[0, 0, 0, 0] for i in range(N + 1)]
    dp[0] = [1, 0, 0, 0]
    A = 0
    B = 1
    C = 2
    D = 3
    for i in range(1, N + 1):
        dp[i][A] = (dp[i - 1][A] * 8) % MOD
        dp[i][B] = (dp[i - 1][A] + dp[i - 1][B] * 9) % MOD
        dp[i][C] = (dp[i - 1][A] + dp[i - 1][C] * 9) % MOD
        dp[i][D] = (dp[i - 1][B] + dp[i - 1][C] + dp[i - 1][D] * 10) % MOD
        # print(i, dp[i], sum(dp[i]))
    return dp[N][D]


N = int(eval(input()))
print((test(N)))
# print(solve(N))

-    answer = 0 -    for i in range(1, 10**N): -        s = ("%0" + str(N) + "d") % i -        if "0" in s and "9" in s: -            # print(s) -            answer += 1 -    return answer +    MOD = 10**9 + 7 +    U = (pow(10, N, MOD) - 1) % MOD +    notA = (pow(9, N, MOD) - 1) % MOD +    notB = (pow(9, N, MOD) - 1) % MOD +    A = (U - notA) % MOD +    B = (U - notB) % MOD +    AnorB = (pow(8, N, MOD) - 1) % MOD +    AorB = (U - AnorB) % MOD +    AandB = (A + B - AorB) % MOD +    # print(f"{U=}, {AorB=}, {A=}, {B=}, {AnorB=}") +    return AandB -        # 0 -print((solve(N))) +print((test(N))) +# print(solve(N))