import qualified Data.ByteString.Char8 as BS
import Data.Maybe
import Control.Monad


readInt = fst . fromJust . BS.readInteger
getInt = readInt <$> BS.getLine

primeFactrization :: Integer -> Integer -> [Integer]
primeFactrization n i
                  | n < i = []
                  | isDivisor = [i] ++ primeFactrization n (i + 1)
                  | not isDivisor  = primeFactrization n (i + 1)
                  | otherwise = []
                  where
                      isDivisor = if n `mod` i == 0 then True else False

hyakugo :: Integer -> [Integer]
hyakugo n
        | n < 1 = []
        | muchLen && isOdd  = [n] ++ hyakugo (n - 1)
        | otherwise = hyakugo (n - 1)
        where
            numPF = length (primeFactrization n 1)
            isOdd = if n `mod` 2 == 0 then False else True
            muchLen = if numPF == 8 then True else False
            
main = do
     n <- getInt
     print $ length (hyakugo n)