import System.IO

prime :: [Int]
prime = remove4Prime [2..999999]

remove4Prime :: [Int] -> [Int]
remove4Prime [] = []
remove4Prime (x:xs) 
  | x^2 < 999999 = x : remove4Prime [a | a <- xs, mod a x /= 0]
  | otherwise = (x:xs)

main = 
  myLoop prime
  --print prime
myLoop x = do
  eof <- isEOF
  if eof
    then 
      return ()
    else do
      num <- getLine
      print $ length $ [a | a <- x, a <= (read num :: Int)]
      myLoop x