program sample
  implicit none

  integer(16) :: n,m,a,b,c,ans,i
  read(*,*) n

  m=10**9+7
  a=1
  b=1
  c=1

  do i=1,n
     a=a*10
     a=mod(a,m)
  enddo

  do i=1,n
     b=b*9
     b=mod(b,m)
  enddo

  do i=1,n
     c=c*8
     c=mod(c,m)
  enddo

  ans=mod(a-b*2+c,m)

  if(ans<0)then
     ans=ans+m
  endif
  
  write(*,*) ans

  stop
end program sample