{-# OPTIONS_GHC -Wall #-}

readInt :: String -> Int
readInt = read

divisors :: Int -> [Int]
divisors n = filter (\d -> n `mod` d == 0) [1..n]

solve :: Int -> Int
solve n = (length . filter isOk) [1..n]
    where
        isOk m = odd m && (length . divisors) m == 8

main :: IO ()
main = do
    n <- fmap readInt getLine

    let ans = solve n

    print ans
