"""

int(input())

map(int, input().split())

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

input()

input().split()

"""





n = int(eval(input()))

mod = 1000000007



tmp = 1

diff = 1

eight = 1



for i in range(n):

    tmp *= 10

    tmp %= mod

    diff *= 9

    diff %= mod

    eight *= 8

    eight %= mod



ans = tmp - 2*diff + eight

ans %= mod

print(ans)



# tmp = (10**n)%mod

# diff = 2*(9**n)%mod

# eight = (8**n)%mod



# ans = tmp - diff + eight

# print(ans)
"""

int(input())

map(int, input().split())

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

input()

input().split()

"""





n = int(eval(input()))

mod = 1000000007

tmp = (10**n)%mod

diff = 2*(9**n)%mod

eight = (8**n)%mod



ans = tmp - diff + eight

ans%=mod

print(ans)

"""
int(input())
map(int, input().split())
list(map(int, input().split()))
input()
input().split()
"""
n = int(eval(input()))
mod = 1000000007
tmp = 1
diff = 1
eight = 1
for i in range(n):
    tmp *= 10
    tmp %= mod
    diff *= 9
    diff %= mod
    eight *= 8
    eight %= mod
ans = tmp - 2 * diff + eight
ans %= mod
print(ans)
# tmp = (10**n)%mod
# diff = 2*(9**n)%mod
# eight = (8**n)%mod
# ans = tmp - diff + eight
# print(ans)

"""
int(input())
map(int, input().split())
list(map(int, input().split()))
input()
input().split()
"""
n = int(eval(input()))
mod = 1000000007
tmp = (10**n) % mod
diff = 2 * (9**n) % mod
eight = (8**n) % mod
ans = tmp - diff + eight
ans %= mod
print(ans)

-tmp = 1 -diff = 1 -eight = 1 -for i in range(n): -    tmp *= 10 -    tmp %= mod -    diff *= 9 -    diff %= mod -    eight *= 8 -    eight %= mod -ans = tmp - 2 * diff + eight +tmp = (10**n) % mod +diff = 2 * (9**n) % mod +eight = (8**n) % mod +ans = tmp - diff + eight -# tmp = (10**n)%mod -# diff = 2*(9**n)%mod -# eight = (8**n)%mod -# ans = tmp - diff + eight -# print(ans)