import           Data.Numbers.Primes (primeFactors)
import qualified Data.Map.Strict as M

main :: IO ()
main = do
  n <- readLn :: IO Integer
  let primes = M.fromListWith (+) . fmap (\x -> (x, 1)) . primeFactors $ n
      result = M.foldl' (\b a -> b + f a) 0 primes
  print result

f :: Integer -> Integer
f n = go n 0
  where
    go a b = let v = b * (b + 1) `div` 2
             in if v < a
                then go a (b + 1)
                else if v == a
                     then b
                     else b - 1
