
'''simple docstring'''



def 				_lowerCAmelCase  (			lowerCamelCase_     :					Any			):
			for i in range(0						,    lowerCamelCase_			):
						for _ in range(0						,    n - i - 1			):  # printing spaces
									print(''' '''						,    end=''''''			)
						for _ in range(0						,    i + 1			):  # printing stars
									print('''* '''						,    end=''''''			)
						print()




def 				_lowerCAmelCase  (			lowerCamelCase_     :					int			):
			for i in range(lowerCamelCase_						,    0						,    -1			):
						for _ in range(lowerCamelCase_						,    0						,    -1			):  # printing stars
									print('''* '''						,    end=''''''			)
						print()
						for _ in range(n - i + 1						,    0						,    -1			):  # printing spaces
									print(''' '''						,    end=''''''			)




def 				_lowerCAmelCase  (			lowerCamelCase_     :					Optional[int]			):
			if n <= 0:
						print('''       ...       ....        nothing printing :('''			)
						return
			floyd(lowerCamelCase_			)  # upper half
			reverse_floyd(lowerCamelCase_			)  # lower half


if __name__ == "__main__":
	print(R'''| /\ | |- |  |-  |--| |\  /| |-''')
	print(R'''|/  \| |- |_ |_  |__| | \/ | |_''')
	_SCREAMING_SNAKE_CASE   =      1
	while K:
		_SCREAMING_SNAKE_CASE   =      int(input('''enter the number and , and see the magic : '''))
		print()
		pretty_print(user_number)
		_SCREAMING_SNAKE_CASE   =      int(input('''press 0 to exit... and 1 to continue...'''))

	print('''Good Bye...''')












'''simple docstring'''



from math import sqrt




def 				_lowerCAmelCase  (			lowerCamelCase_     :					int			):
			__lowercase			  =							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  (			lowerCamelCase_     :					int = 1_0_0_0_0			):
			__lowercase			  =							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())))





