main :: IO ()
main = do
  n <- readLn :: IO Int
  print $ length $ filter odd8 [1..n]

factors :: Int -> [Int]
factors n = filter ((==0).(n`mod`)) [1..n]

odd8 :: Int -> Bool
odd8 n
  | even n    = False
  | otherwise = length (factors n) == 8