require 'pp'

MOD = 10 ** 9 + 7
n = gets.to_i

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


n10 = 1
n9 = 1
n8 = 1
n.times do |i|
    n10 = (n10 * 10) % MOD
    n9 = (n9 * 9) % MOD
    n8 = (n8 * 8) % MOD
end

puts (n10 - (((2 * n9) % MOD - n8) % MOD)) % MOD
