import Control.Monad
import Data.List

-- firstBinary :: (Int -> Bool) -> Int -> Int -> Int
firstBinary _ l r | l == r = l
firstBinary f l r = let m = div (l + r) 2 in if f m then firstBinary f l m else firstBinary f (m + 1) r

count :: (a -> Bool) -> [a] -> Int
count f l = length [i | i <- l, f i]

divCount :: Int -> Int
divCount n = count ((== 0) . div n) [1..n]

main = do
    [n]  <- map read . words <$> getLine
    print $ count cond [1..n]
    where cond i = divCount i == 8 && div i 2 == 1
