import Data.List

main :: IO ()
main = do
  n <- getInt
  print $ countIf ((== 8) . length . divisors) [1,3..n]

divisors :: Int -> [Int]
divisors n = [x | x <- [1..n], n `rem` x == 0]

getInt :: IO Int
getInt = read <$> getLine

countIf :: (a -> Bool) -> [a] -> Int
countIf f = length . filter f
