program answer
  implicit none
  integer(16) :: i, N, ans, a, b, c
  read(*,*) N

  i=0
  a=1
  b=1
  c=1
  do
     if(i==N) then
        exit
     end if
     a=mod(10*a,10**9+7)
     b=mod(9*b,10**9+7)
     c=mod(8*c,10**9+7)
     i=i+1
  end do

  ans=a-mod(2*b,10**9+7)+c
  ans=mod(ans,10**9+7)
  write(*,*) ans
  stop
 end program answer