def to_the_n(num,n)
  result = 1
  i = 0
  while i < n
    result *= num
    result %= (10**9 + 7)
    i += 1
  end
  result
end
n = gets.to_i
ans = to_the_n(10,n) - 2 * to_the_n(9,n) + to_the_n(8,n)
ans %= (10**9 + 7)
puts ans
