import math n = int(input()) if n % 2 == 0: n /= 2 li = [] li.append(n) f = n // 2 for i in range(1,f + 1): if n % i == 0: li.append(i) print(li) print(sum(li))