program main
	implicit integer(a-z)
    ans=0
    
    read(*,*)n
    
    do i=1,n
    	count=0
        do j=1,n
        	if(mod(i,j).eq.0.and.mod(i,2).eq.1) then
            	count=count+1
            end if
        end	do
        if(count.eq.8) ans=ans+1
    end do
    
    write(*,*)ans
    
end program main