import Data.List
import Data.Ord
import Data.Char
import Data.Ratio
import Data.Maybe

main = do
  n <- readLn :: IO Int
  let ys = [[y|y<-[x,x-1..1], mod x y==0]|x<-[1,3..n]]
  print $ length $ map head [z|z<-ys, length z==8]