module Main where

import Control.Applicative
import Control.Monad

solve :: Int -> Int
solve n =
    let f m = filter (\d -> m `mod` d == 0) [1 .. m]
    in length $ filter ((== 8) . length) $ fmap f [1, 3 .. n]

main :: IO ()
main = do
    n <- readLn
    print $ solve n