import Control.Applicative
import Data.List


main = do
    n <- readLn
    putStrLn $ show (solve n)

factors :: Int -> [Int]
factors n = [x | x <- [1..n], n `mod` x == 0]

factorization :: Int -> [Int]
factorization 1 = []
factorization x = v : factorization (x `div` v)
    where
        v = (factors x) !! 1

ndivider :: Int -> Int
ndivider n = foldl (\acc x -> acc * (length x + 1)) 1 (group $ factorization n)

solve :: Int -> Int
solve n = length([x | x <- [1..n], x `mod` 2 == 1, ndivider x == 8])
