target = int(input()) sum = 0 for i in range(1,target+1) : if target % i == 0 : sum += i print(sum)