N=int(input()) sum=0 s=int((N**0.5)) for i in range(1,s+1): if N==1: sum+=1 break if N%i==0: sum+=(i+N//i) print(sum)