



from math import sqrt





def 							A			(  _UpperCAmelCase       :     int					)       ->				Tuple:







			'''simple docstring'''
			_UpperCAmelCase	 =     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 							A			(  _UpperCAmelCase       :     int = 10_000					)       ->				int:







			'''simple docstring'''
			_UpperCAmelCase	 =     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())))





def 							A			(  _UpperCAmelCase       :     int							,     _UpperCAmelCase       :     int					)       ->				str:







			'''simple docstring'''
			if a < 0 or b < 0:
						raise ValueError('the value of both inputs must be positive'					)

			_UpperCAmelCase	 =     str(bin(_UpperCAmelCase					)					)[2:]  # remove the leading "0b"
			_UpperCAmelCase	 =     str(bin(_UpperCAmelCase					)					)[2:]  # remove the leading "0b"

			_UpperCAmelCase	 =     max(len(_UpperCAmelCase					)							,     len(_UpperCAmelCase					)					)

			return "0b" + "".join(
			    str(int(char_a != char_b					)					)
			    for char_a, char_b in zip(a_binary.zfill(_UpperCAmelCase					)							,     b_binary.zfill(_UpperCAmelCase					)					)					)


if __name__ == "__main__":
							import doctest

							doctest.testmod()
