import Control.Monad

main = do
  n <- read <$> getLine
  print $ length $ filter ( <= n) numbers_with_eight_divisors

numbers_with_eight_divisors =
  filter (\k -> count_divisors k == 8) [1, 3 .. 199]

count_divisors k =
  length $ filter (\d -> mod k d == 0) [1 .. k]
