open System

let primeFactors (n: int64): Map<int64, int> =
    let rec f n i acc =
        if n % i = 0L then
            f (n / i) i (i::acc)
        elif n < i * i && n <> 1L then 
            n :: acc 
        elif n < i * i then 
            acc 
        else 
            f n (i + 1L) acc 
    f n 2L []
    |> List.groupBy id 
    |> List.map(fun (key, values) -> key, List.length values)
    |> Map.ofList

let getN (n: int): int =
    let rec f n proposed acc =
        if n >= proposed then 
            f (n - proposed) (proposed + 1) (acc + 1)
        else 
            acc 
    f n 1 0 

Console.ReadLine()
|> int64
|> primeFactors
|> Map.map(fun _ v -> getN v)
|> Map.toList 
|> List.map snd 
|> List.sum 
|> printfn "%i" 