n = gets.to_i
t1 = 1 #0-9
t2 = 1 #1-8
t3 = 1 #1-9 or 0-8
mod = 10**9 + 7
for i in 0...n
  t1 *= 10
  t2 *= 8
  t3 *= 9
  t1 %= mod
  t2 %= mod
  t3 %= mod
end
ans = t1 - t2 - (t3-t2) * 2
if ans < 0
  ans += mod
end

puts ans