import Control.Applicative

solver :: [Int] -> Int -> Int
solver [] _ = 0
solver xs n = length $ filter ( <= n) xs


primeFilter :: [Int] -> [Int]
primeFilter []     = []
primeFilter (p:xs) = p : primeFilter [x | x <- xs, x `mod` p /= 0]

main :: IO()
main = do
  input <- map read . lines <$> getContents
  let pList = primeFilter [2..(maximum input)]
  mapM_ (print . solver pList) input