program ubiquity
  implicit none
  integer(8), parameter :: modu = 1000000007
  integer :: n
  read(*,*) n
  write(*,'(i0)') modulo(pow(10_8, n) - pow(9_8, n) * 2 + pow(8_8, n), modu)
contains
  integer(8) function pow(a, n) result(res)
    integer(8), intent(in) :: a
    integer, intent(in) :: n
    integer(8) :: b
    integer :: m
    res = 1
    b = a
    m = n
    do while (m > 0)
      if (btest(m, 0)) res = mod(res * b, modu)
      b = mod(b * b, modu)
      m = rshift(m, 1)
    end do
  end
end program ubiquity