import Debug.Trace


count :: Int -> Int
count x = length (filter (\a -> mod x a == 0) [1..x])

check :: Int -> Bool
check x
    | even x = False
    | otherwise = 
        let val = count x == 8 in
        val

solve :: Int -> Int
solve a = length (filter id (map check [1..a]))

main :: IO ()
main = do
    a <- read <$> getLine
    print (solve a)

