program prime_numbers
    implicit none
    integer(8) i, j,k, n,y
    
    integer(8) :: x(5) = (/3,5,7,11,13/)
    read (*,*)n
    y=0
    do i=3,5
                 
        if (x(i)*15<=n)then
         y=y+1
        end if

    end do
    do i=2,5
        if (x(i)*27S<=n)then
            y=y+1
           end if   
    end do
    write(*,*)y
    stop
  end program prime_numbers