import Data.String
import Control.Applicative

main = do
        x <- words <$> getContents
        mapM print (map solve (map read x))

dropMulti :: Int -> [Int] -> [Int]
dropMulti x = filter(\z -> (mod z x) /= 0)

takePrime :: [Int] -> [Int]
takePrime []      = []
takePrime (x:xs)  = x : (takePrime $ dropMulti x xs)

primes :: Int -> [Int]
primes n = takePrime [2..n]

solve :: Int -> Int
solve n = length $ primes n