small :: [Int]
small = [3,5,7,11,13,17,19]

eightFactors :: Int -> [Int]
eightFactors n = filter (<=n) $ l1 ++ l2
 where
  l1 = [p*(q^3) | p<-small, q<-small, p/=q]
  l2 = [p*q*r | p <- small, q<- filter (>p) small, r<-filter (>q) small]

main = do
 n <- read <$> getLine
 putStrLn $ show $ length $ eightFactors n
