def findPrime(inputList)
  j = 0
  while j < inputList.size
    n = inputList[j]
    inputList.delete_if{|i|
      i != n and i % n == 0
    }
    j += 1
  end

  return inputList
end

input = Array.new()

while (line = gets) != nil
  input.push(line.to_i)
end

for n in input
  puts findPrime(Array.new(n - 1){|i| i + 2}).size
end