sieve :: [Int] -> Int -> Bool
sieve [] n = True
sieve (p:ps) n
    | n `mod` p == 0 = False
    | p*p > n = True
    | otherwise = sieve ps n

primes :: [Int]
primes = 2 : 3 : filter (sieve primes) [5,7..]

expo :: Int -> Int -> (Int, Int)
expo p = go 0 1 where
    go k s n
        | r == 0 = go (k+1) (s * p) q
        | otherwise = (k,n)
        where (q,r) = n `divMod` p

factorize :: Int -> [(Int, Int)]
factorize = go primes where
    go (p:ps) n
        | n == 1 = []
        | p*p > n = [(n, 1)] -- n must be prime
        | k > 0 = (p,k) : go ps s
        | otherwise = go ps n
        where (k,s) = expo p n

goo :: Int -> Int
goo = go 0 1 where
    go r k n | k > n = r
             | otherwise = go (r+1) (k+1) (n-k)

main = do
    n <- readLn :: IO Int
    print (sum . map (goo . snd) . factorize $ n)
