require 'set'; require 'prime'; require 'pp'
INF=Float::INFINITY; MOD=10**9+7
n = gets.chomp.to_i

if n == 1
  puts 0
  exit
elsif n == 2
  puts 2
  exit
end

zero = 10.pow(n, MOD) - 9.pow(n, MOD)
nine = 10.pow(n, MOD) - 9.pow(n, MOD)
soto = 8.pow(n, MOD)
puts (soto + zero + nine - 10.pow(n, MOD) + MOD*10) % MOD