import qualified Data.ByteString.Char8 as BS
import Data.List
import Data.Maybe

readInt = fst . fromJust . BS.readInteger

getInt = readInt <$> BS.getLine

factors :: Integer -> [Integer]
factors n = [x | x <- [1 .. n], n `mod` x == 0]

factorization :: Integer -> [Integer]
factorization 1 = []
factorization x = v : factorization (x `div` v)
  where
    v = factors x !! 1

countNum :: [Integer] -> [Int]
countNum [] = []
countNum xs = k : countNum xs2
  where
    num = head xs
    (xs1, xs2) = span (== num) xs
    k = length xs1

checkParts :: Int -> Int -> Int
checkParts t n
  | t >= n = 1 + checkParts (t - n) (n + 1)
  | otherwise = 0

calc :: [Int] -> Int
calc [] = 0
calc (t : ts) = checkParts t 1 + calc ts

main = do
  n <- getInt
  if n == 1
    then print 0
    else print $ calc (countNum (factorization n))
