primes :: [Int]
primes = sieve [2..]
  where
    sieve (p:xs) = p : sieve [x|x <- xs, x `mod` p > 0]
    
ans:: Int -> Int
ans n =
	length $ takeWhile (<=n) primes

main = do
	c <- getContents
	let i = map read $ lines c :: [Int]
	    o = map ans i
	mapM_ (putStrLn . show) o