      PROGRAM Ubiquity
      IMPLICIT NONE
      INTEGER,PARAMETER :: p = 16, m = 10**9 + 7
      integer(p) :: ans,n,i,temp1=1,temp2=1,temp3=1
      
      read*,n
      
      do i = 1,n
        temp1 = mod(temp1*9,m)
      end do
      temp1 = mod(temp1*2,m)
      
      do i = 1,n
        temp2 = temp2 * 10
        temp2 = mod(temp2,m**2_p)
      end do
      do i = 1,n
        temp3  = mod(temp3*8,m)
      end do
      
      ans = -temp1 + temp3 + temp2
      ans = mod(ans,m)
      print*,ans
      
      
      
      
      
      stop
      !debugg
      print*, ''
      print*,temp1
      print*,temp2
      print*,temp3
      
      
      END PROGRAM