for e in raw_input().split(): try: m=n=int(e);d=0;p=2 while p*p<=n*n:r=m%p<1;m/=p**r;d+=n/p*r;p+=1-r except:d="Wait, that's not a number..." print d