


"""simple docstring"""


import baseaa







def  __snake_case       (   UpperCamelCase__	)      ->		bytes:







		"""simple docstring"""





		return baseaa.baaencode(string.encode('utf-8'	)	)







def  __snake_case       (   UpperCamelCase__	)      ->		str:







		"""simple docstring"""





		return baseaa.baadecode(UpperCamelCase__	).decode('utf-8'	)


if __name__ == "__main__":
	UpperCamelCase						:				Tuple             =      "Hello World!"
	UpperCamelCase						:				List[str]             =      baseaa_encode(test)
	print(encoded)

	UpperCamelCase						:				Any             =      baseaa_decode(encoded)
	print(decoded)









"""simple docstring"""


from math import sqrt







def  __snake_case       (   UpperCamelCase__	)      ->		int:







		"""simple docstring"""





		A					       = 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  __snake_case       (   UpperCamelCase__ = 10000	)      ->		int:







		"""simple docstring"""





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





