$M = 1000000007
def pow(x, n)
  ret = 1
  while n > 0
    ret = (ret * x) % $M if n % 2 == 1
    x *= x
    n >>= 1
  end
  return ret
end

n = gets.to_i
puts (pow(10, n) - 2*pow(9, n) + pow(8, n) + $M) % $M