from sys import exit, stdin



input = stdin.readline

import copy



# from collections import deque,Counter

# import numpy as np





def pow_mod(a, n, d):

    tmp = 1

    for _ in range(n):

        tmp = (tmp * a) % d

    return tmp





(N,) = list(map(int, input().split()))

mod = 10 ** 9 + 7

ans = (pow_mod(10, N, mod) + pow_mod(8, N, mod) - 2 * pow_mod(9, N, mod)) % mod



print(ans)

from sys import exit, stdin



input = stdin.readline

import copy



# from collections import deque,Counter

# import numpy as np



(N,) = list(map(int, input().split()))

mod = 10 ** 9 + 7

ans = (pow(10, N, mod) + pow(8, N, mod) - 2 * pow(9, N, mod)) % mod



print(ans)

from sys import exit, stdin

input = stdin.readline
import copy

# from collections import deque,Counter
# import numpy as np
def pow_mod(a, n, d):
    tmp = 1
    for _ in range(n):
        tmp = (tmp * a) % d
    return tmp


(N,) = list(map(int, input().split()))
mod = 10**9 + 7
ans = (pow_mod(10, N, mod) + pow_mod(8, N, mod) - 2 * pow_mod(9, N, mod)) % mod
print(ans)

from sys import exit, stdin

input = stdin.readline
import copy

# from collections import deque,Counter
# import numpy as np
(N,) = list(map(int, input().split()))
mod = 10**9 + 7
ans = (pow(10, N, mod) + pow(8, N, mod) - 2 * pow(9, N, mod)) % mod
print(ans)

-def pow_mod(a, n, d): -    tmp = 1 -    for _ in range(n): -        tmp = (tmp * a) % d -    return tmp - - -ans = (pow_mod(10, N, mod) + pow_mod(8, N, mod) - 2 * pow_mod(9, N, mod)) % mod +ans = (pow(10, N, mod) + pow(8, N, mod) - 2 * pow(9, N, mod)) % mod