import core.bitop, std.algorithm, std.ascii, std.bigint, std.conv,
    std.functional, std.math, std.numeric, std.range, std.stdio, std.string,
    std.random, std.typecons, std.container;

ulong MAX = 1_000_100, MOD = 1_000_000_007, INF = 1_000_000_000_000;
alias sread = () => readln.chomp();
alias lread(T = long) = () => readln.chomp.to!(T);
alias aryread(T = long) = () => readln.split.to!(T[]);
alias Pair = Tuple!(long, "l    ", long, "r");
alias PQueue(T, alias less = "a<b") = BinaryHeap!(Array!T, less);

void main()
{
    auto n = lread();
    auto p = primeFactorization(n);
    // p.writeln();
    long ans;
    foreach (key, value; p)
    {
        ans += value.sumLowerBound();
    }
    ans.writeln();
}

auto primeFactorization(long n)
{
    long[long] p;

    while (n > 1)
    {
        auto tmp = n.minPrime();
        if (tmp in p)
            p[tmp]++;
        else
            p[tmp] = 1;

        n /= tmp;
    }
    return p;
}

long minPrime(long n)
{
    foreach (i; iota(2, sqrtLowerBound(n) + 1))
    {
        if (n % i == 0)
            return i;
    }
    return n;
}

// 二分探索で二乗がnを超えない最大の整数を求める
long sqrtLowerBound(long n)
{
    long ok = 1, ng = n;
    while (abs(ok - ng) > 1)
    {
        long mid = (ok + ng) / 2;
        if (mid ^^ 2 <= n)
            ok = mid;
        else
            ng = mid;
    }
    return ok;
}

// 1~kまでの和がn以下の最大のk
long sumLowerBound(long n)
{
    long ok = 1, ng = n;
    while (abs(ok - ng) > 1)
    {
        long mid = (ok + ng) / 2;
        if(mid * (mid + 1) / 2 <= n)
            ok = mid;
        else
            ng = mid;
    }
    return ok;
}

void scan(TList...)(ref TList Args)
{
    auto line = readln.split();
    foreach (i, T; TList)
    {
        T val = line[i].to!(T);
        Args[i] = val;
    }
}
