





from math import sqrt





def   lowerCamelCase__       (       UpperCamelCase__     :    List[Any]  )     ->	Any:



					'''simple docstring'''




					_snake_case													=			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__       (       UpperCamelCase__     :    Optional[Any] = 10_000  )     ->	Any:



					'''simple docstring'''




					_snake_case													=			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())))










from collections.abc import Sequence





def   lowerCamelCase__       (       UpperCamelCase__     :    Sequence[float]    ,      UpperCamelCase__     :    bool = False  )     ->	float:



					'''simple docstring'''




					if not arr:
										return 0

					_snake_case													=			0 if allow_empty_subarrays else float('-inf'  )
					_snake_case													=			0.0
					for num in arr:
										_snake_case													=			max(0 if allow_empty_subarrays else num    ,      curr_sum + num  )
										_snake_case													=			max(UpperCamelCase__    ,      UpperCamelCase__  )

					return max_sum


if __name__ == "__main__":
					from doctest import testmod

					testmod()

					UpperCAmelCase_ 							=       [-2, 1, -3, 4, -1, 2, 1, -5, 4]
					print(F"{max_subarray_sum(nums) = }")



