# n = gets.chomp.to_i
# if n < 2
#   puts 0
# else
#   arr = (0..9).to_a.permutation(n).to_a
#   arr.select!{|a| a.include?(0) && a.include?(9)}
#   p arr.size
# end .select!{|a| a.include?(0) && a.include?(9)}
# arr = (0..9).to_a.repeated_permutation(869121).to_a
# p arr.size
n = gets.chomp.to_i
MOD = 10**9+7
ans = ((10**n)-(9**n)-(9**n)+(8**n))%MOD
puts ans

