



'''simple docstring'''

def        __lowerCamelCase					(				lowerCAmelCase_  )      ->				list:

		def merge(lowerCAmelCase_						,      lowerCAmelCase_  ) -> list:

				def _merge():
						while left and right:
								yield (left if left[0] <= right[0] else right).pop(0  )
						yield from left
						yield from right

				return list(_merge()  )

		if len(lowerCAmelCase_  ) <= 1:
				return collection
		_a					:				List[str]				=							len(lowerCAmelCase_  ) // 2
		return merge(merge_sort(collection[:mid]  )						,      merge_sort(collection[mid:]  )  )


if __name__ == "__main__":
							import doctest

							doctest.testmod()
							__lowerCAmelCase						      =       input('''Enter numbers separated by a comma:\n''').strip()
							__lowerCAmelCase						      =       [int(item) for item in user_input.split(''',''')]
							print(*merge_sort(unsorted), sep=''',''')









'''simple docstring'''

from math import sqrt



def 					__lowerCamelCase					(				lowerCAmelCase_  )      ->				int:
		_a					:				Dict				=							0
		for i in range(1						,      int(sqrt(lowerCAmelCase_  ) + 1  )  ):
				if n % i == 0 and i != sqrt(lowerCAmelCase_  ):
						total += i + n // i
				elif i == sqrt(lowerCAmelCase_  ):
						total += i
		return total - n



def 					__lowerCamelCase					(				lowerCAmelCase_ = 10000  )      ->				int:
		_a					:				Union[str, Any]				=							sum(
		    i
		    for i in range(1						,      lowerCAmelCase_  )
		    if sum_of_divisors(sum_of_divisors(lowerCAmelCase_  )  ) == i and sum_of_divisors(lowerCAmelCase_  ) != i  )
		return total


if __name__ == "__main__":
							print(solution(int(str(input()).strip())))




