import Control.Applicative
import Control.Monad
import Data.List

main :: IO ()
main = solve <$> readLn >>= print

solve :: Int -> Int
solve n = length . takeWhile (<=n) . sort $ xs ++ ys
  where xs = nub $ do
          let as = [3,5,7,11,13]
          a <- as
          let bs = delete a as
          b <- bs
          let cs = delete b bs
          c <- cs
          let d = a * b * c
          guard $ d <= 200
          return d
        ys = do
          a <- [5,7,11,13]
          let b = 27 * a
          guard $ b <= 200
          return b
