prim :: Int -> [Int]
prim x
  | x < 2 = []
  | otherwise = prim' [2..x]

prim' :: [Int] -> [Int]
prim' [] = []
prim' (x:xs) = x : prim' [a | a <- xs, mod a x /= 0]

main :: IO()
main = do
  n <- readLn
  print $ length $ prim n