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