from collections import Counter def factorization(n) -> list: if n == 1: return Counter([0]) ret = [] i = 2 while i * i <= n: while n % i == 0: n //= i ret.append(i) i += 1 if n != 1: ret.append(n) return Counter(ret) def main(): n=int(input()) ans=1 for k,v in factorization(n).items(): ans*=(k**(v+1)-1)//(k-1) print(ans) if __name__=="__main__": main()