main = do 
  n <- read <$> getLine :: IO Int
  print $ solve n


solve :: Int -> Int
solve n =
  length $ filter (\x -> (length $ dividers x) == 8) [x | x <- [1..n], odd x]

dividers :: Int -> [Int]
dividers n =
  let sq = until (\x -> x * x > n) (+ 1) 0
  in
    do
      x <- [1..sq]
      y <- return $ n `div` x
      if n `mod` x == 0 then
        if x /= y then
          [x, y]
        else
          [x]
      else
        []
        
