def Prime_Factorization(N): if N<0: R=[[-1,1]] else: R=[] N=abs(N) if N&1==0: C=0 while N&1==0: N>>=1 C+=1 R.append([2,C]) if N%3==0: C=0 while N%3==0: N//=3 C+=1 R.append([3,C]) k=5 Flag=0 while k*k<=N: if N%k==0: C=0 while N%k==0: C+=1 N//=k R.append([k,C]) k+=2+2*Flag Flag^=1 if N!=1: R.append([N,1]) return R #================================================== N=int(input()) X=0 for p,e in Prime_Factorization(N): X+=p*e print(X)