class InputLine
  def self.to_s
    gets.chomp
  end

  def self.to_i
    InputLine.to_s.to_i
  end
  
  def self.to_f
    InputLine.to_s.to_f
  end

  def self.to_sa
    InputLine.to_s.split(' ')
  end

  def self.to_ia
    InputLine.to_sa.map(&:to_i)
  end
  
  def self.to_fa
    InputLine.to_sa.map(&:to_f)
  end
end

MOD = 1000000007

def binpow_mod(b, e)
  return 1       if e <= 0
  return b % MOD if e == 1

  p = binpow_mod(b, e >> 1)
  q = (p * p) % MOD
  q = (q * b) % MOD if (e % 2) == 1
  return q
end

def solve(n)
  a = binpow_mod(10, n)
  b = binpow_mod(9,  n)
  c = binpow_mod(8,  n)

  x = (2 * (a + MOD - b)) % MOD
  y = ((a + MOD) - c) % MOD
  return ((x + MOD) - y) % MOD
end

def main(argv)
  n = InputLine.to_i

  puts solve(n).to_s
end

if self.to_s == 'main' then
  main(ARGV)
end