import Control.Applicative
import Control.Monad
import Data.List
import Data.Array
import Data.Char

main = do
  n <- (read::String -> Int) <$> getLine
  print $ length $ filter is_valid [1,3..n]


is_valid::Int -> Bool
is_valid n = let numDiv = length $ filter (\i -> n `mod` i == 0) [1..n]
              in numDiv == 8
