





from math import sqrt





def   lowerCamelCase__       (       UpperCamelCase__     :    int  )     ->	int:



					'''simple docstring'''




					_snake_case													=			0
					for i in range(1    ,      int(sqrt(UpperCamelCase__  ) + 1  )  ):
										if n % i == 0 and i != sqrt(UpperCamelCase__  ):
															total += i + n // i
										elif i == sqrt(UpperCamelCase__  ):
															total += i
					return total - n





def   lowerCamelCase__       (       UpperCamelCase__     :    int = 10_000  )     ->	int:



					'''simple docstring'''




					_snake_case													=			sum(
					    i
					    for i in range(1    ,      UpperCamelCase__  )
					    if sum_of_divisors(sum_of_divisors(UpperCamelCase__  )  ) == i and sum_of_divisors(UpperCamelCase__  ) != i  )
					return total


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










from collections import defaultdict

from graphs.minimum_spanning_tree_prims import prisms_algorithm as mst





def   lowerCamelCase__       (       )     ->	List[str]:



					'''simple docstring'''




					_snake_case							,       _snake_case													=			9, 14  # noqa: F841
					_snake_case													=			[
					    [0, 1, 4],
					    [0, 7, 8],
					    [1, 2, 8],
					    [7, 8, 7],
					    [7, 6, 1],
					    [2, 8, 2],
					    [8, 6, 6],
					    [2, 3, 7],
					    [2, 5, 4],
					    [6, 5, 2],
					    [3, 5, 14],
					    [3, 4, 9],
					    [5, 4, 10],
					    [1, 7, 11],
					]

					_snake_case													=			defaultdict(UpperCamelCase__  )
					for nodea, nodea, cost in edges:
										adjancency[nodea].append([nodea, cost]  )
										adjancency[nodea].append([nodea, cost]  )

					_snake_case													=			mst(UpperCamelCase__  )

					_snake_case													=			[
					    [7, 6, 1],
					    [2, 8, 2],
					    [6, 5, 2],
					    [0, 1, 4],
					    [2, 5, 4],
					    [2, 3, 7],
					    [0, 7, 8],
					    [3, 4, 9],
					]

					for answer in expected:
										_snake_case													=			tuple(answer[:2]  )
										_snake_case													=			tuple(edge[::-1]  )
										assert edge in result or reverse in result



