import Control.Monad
import Control.Applicative
import Data.List
import Data.Array
import Data.Maybe
import Data.Bits
import Data.Ord
import qualified Data.ByteString.Char8 as BS
import qualified Data.Set as Set
import Debug.Trace

listToTuple2 [a,b] = (a,b)
listToTuple3 [a,b,c] = (a,b,c)
listToTuple4 [a,b,c,d] = (a,b,c,d)

getWords = getLine >>= return . words

readIntBS = fst . fromJust . BS.readInt

divisors n = [i | i<-[1..n], n `mod` i == 0]

main :: IO ()
main = do
  n <- readLn :: IO Int

  print $ length [i | i<-[1..n], odd i, length (divisors i) == 8]
