program main
  implicit none
  
  integer :: i,n,j,c,cc=0
  
  read(*,*)n
  
  do i = 1, n, 2
    c = 0
    do j = 1, n
      if (mod(i,j) == 0) then
        c = c + 1
      end if
    end do
    if (c == 8) then
      cc = cc + 1
    end if
  end do
  write(*,*)cc
end program main
      