FACTSUM - Super Factor Sum

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 < 100 integers, one on each line, all less than 2*10^19.

Output

For each integer compute the super factor sum and output it on a single line.

Example

Input:
6
7

Output:
5
7

Added by:Chen Xiaohong
Date:2008-08-05
Time limit:11.04s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ERL JS-RHINO NODEJS PERL6 VB.NET
Resource:original

hide comments
2013-08-11 13:06:10 John and the cows
I need help!!!!!!!!!!!!
2010-03-18 16:00:58 :(){ :|: & };:

This is actually a good problem.But the time limit is too is way too much.
 

Last edit: 2010-03-18 16:02:37
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.