   program abc106b
      implicit none
      integer::n
      integer::i,j,count,ans
      
         read *, n
         
         ans=0
         do i=1,n,2
            count=0
            do j=1,n
               if (mod(n,j)==0) count=count+1
            end do
            if (count==8) ans=ans+1
         end do
         
         print *, ans
         
   end program abc106b