import qualified Data.ByteString.Char8 as BS
import Data.IntMap as M
import Data.List as L
import Data.Maybe

readInt = fst . fromJust . BS.readInteger

getInt = readInt <$> BS.getLine

-- https://qiita.com/little_Haskeller/items/614a3ae20a517c19bb1f
primes :: Integral a => [a]
primes = L.map fromIntegral $ [2, 3] ++ primes'
    where
      primes' = [5] ++ f 1 7 primes'
      f m s (p : ps) = [n | n <- ns, gcd m n == 1] ++ f (m * p) (p * p) ps
          where ns = [x + y | x <- [s, s + 6 .. p * p - 2], y <- [0, 4]]

fac :: [Integer] -> M.IntMap Integer -> Integer -> M.IntMap Integer
fac _ m 1 = m
fac [] m n = M.insert (fromIntegral n) 1 m
fac pa@(p : pr) m n
  | mod n (fromIntegral p) == 0 = fac pa (M.insertWith (+) (fromIntegral p) 1 m) (div n (fromIntegral p))
  | otherwise = fac pr m n

calc :: [Int] -> Int
calc [] = 0
calc (t : ts) = length (takeWhile (<= t) [i * (i + 1) `div` 2 | i <- [1 ..]]) + calc ts

main = do
  n <- getInt
  if n == 1
    then print 0
    else do
      let factors = fac primes M.empty n
      print $ calc (L.map fromIntegral (M.elems factors))
