Problem: Given a positive integer K > 2, with prime
factorization:

K = p1^a1 * p2^a2 ... * pn^an

Compute the following:

S = a1*p1 + a2*p2 ... + an*pn.


Input
A list of 
Output
For each integer compute the super factor
sum and output it on a single line.

Example

Input:
6
7
Output:
5
7

Solution (in PYTHON):

Solution:
from fractions import gcd
import sys
import cStringIO
from Queue import Queue
import random
def rho(n):
    if n%2 == 0:
        return 2
    x = y = random.randrange(2, 1000000)
    d = 1
    c = random.randrange(2, 1000000)
    while d==1:
        x = ((x*x)+c)%n
        y = ((y*y)+c)%n
        y = ((y*y)+c)%n
        d = gcd(abs(x-y), n)
        if d == n:
            break
    return d 

def rabin_miller(p):
    if p < 2:
        return False
    if p!= 2 and p%2 == 0:
        return False
    s = p-1
    while (s%2)==0:
        s >>= 1
    for i in xrange(10):
        a = random.randrange(p-1)+1
        temp = s
        mod = pow(a, temp, p)
        while (temp != p-1 and mod != 1 and mod != p-1):
            mod = (mod*mod)%p
            temp *= 2
        if (mod != (p-1) and temp%2 == 0):
            return False
    return True

def prime_decomp(n):
    q1 = Queue()
    q2 = []
    ans = {}
    q1.put(n)
    while not q1.empty():
        l = q1.get()
        if rabin_miller(l):
            q2.append(l)
            continue
        d = rho(l)
        if d==l:
            q1.put(d)
        else:
            q1.put(d)
            q1.put(l/d)
    for i in q2:
        ans[i] = ans.setdefault(i, 0) + 1
    return ans

    
def main():
    inp = iter(cStringIO.StringIO(sys.stdin.read())).next
    while True:
        try:
            n = int(inp())
            l = prime_decomp(n)
            ans = 0
            for i in l:
                ans += i*l[i]
            sys.stdout.write(str(ans)+"\n")
        except:
            break
main()