




from math import sqrt







def      lowerCamelCase_						(			UpperCamelCase__							: int )	->			int:





				"""simple docstring"""


				__lowerCamelCase									=       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 = 1_0000 )	->			int:





				"""simple docstring"""


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








def      lowerCamelCase_						(			)	->			List[str]:





				"""simple docstring"""


				__lowerCamelCase									=       0
				for i in range(1					,	1001 ):
								total += i**i
				return str(UpperCamelCase__ )[-10:]


if __name__ == "__main__":
					print(solution())


