N = gets.to_i
M = 10**9 + 7

def mpow(x, n)
  ret = 1
  while n > 0
    if n.even?
      x = x * x % M
      n >>= 1
    else
      ret = ret * x % M
      n -= 1
    end
  end
  ret
end

puts (mpow(10, N) - 2*mpow(9, N) + mpow(8, N)) % M