solve :: Int ->	[Int]
solve m	= map (\n -> length [x | x <- [1..n], mod n x == 0]) [1..m]

count :: [Int] -> Int
count (x:xs)
  | null xs = 0
  | x == 2 = 1 + count	xs
  | otherwise = count xs

main = getContents >>= mapM_ print . map (count . (++[1]) . solve) . map read . words