import Control.Applicative
import Control.Monad

judge :: Int -> Bool
judge n
    | even n    = False
    | otherwise = (((==) 8) . length) $ filter ( \x -> n `mod` x == 0 ) [1..n]

solver :: Int -> Int
solver n = length $ filter (\x -> judge x) [1..n]

main :: IO ()
main = do
    n <- read <$> getLine
    print $ solver n
