open System

let primeFactors (n: int64)=
    let add (x: int64) (m: Map<int64, int>): Map<int64, int> =
        match Map.tryFind x m with 
        | Some(cnt) -> Map.add x (cnt+1) m
        | None -> Map.add x 1 m 
    let rec f n i acc =
        if n % i = 0L then
            f (n / i) i (add i acc)
        elif n < i * i && n <> 1L then 
            add n acc 
        elif n < i * i then 
            acc 
        else 
            f n (i + 1L) acc 
    f n 2L Map.empty

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" 