main = do
  line <- getLine
  let 
    n = read line :: Int
    func n i ret
      | i > n      = ret
      | (mod n i) == 0 = func n (i+1) (ret+1)
      | otherwise  = func n (i+1) ret
    func2 n ret
      | n <= 0            = ret
      | (mod n 2) == 0    = func2 (n-1) ret
      | (func n 1 0) == 8 = func2 (n-2) (ret+1)
      | otherwise         = func2 (n-2) ret
    in
      putStrLn $ show $ func2 n 0
