





from math import sqrt


def       SCREAMING_SNAKE_CASE__  (       _lowercase     : int			)   ->							int:




		'''simple docstring'''
		lowercase__					:      Any      =		0
		for i in range(1   ,    int(sqrt(_lowercase			) + 1			)			):
				if n % i == 0 and i != sqrt(_lowercase			):
						total += i + n // i
				elif i == sqrt(_lowercase			):
						total += i
		return total - n


def       SCREAMING_SNAKE_CASE__  (       _lowercase     : int = 10_000			)   ->							int:




		'''simple docstring'''
		lowercase__					:      Optional[int]      =		sum(
		    i
		    for i in range(1   ,    _lowercase			)
		    if sum_of_divisors(sum_of_divisors(_lowercase			)			) == i and sum_of_divisors(_lowercase			) != i			)
		return total


if __name__ == "__main__":
			print(solution(int(str(input()).strip())))









from ..utils import DummyObject, requires_backends


class       __lowerCAmelCase					(       metaclass=_UpperCamelCase      ):


	'''simple docstring'''





	_A													=				["note_seq"]

	def __init__(						self:						int,					*lowerCamelCase_:						Optional[int],					**lowerCamelCase_:						Tuple			):
			requires_backends(self,					['note_seq']			)

	@classmethod
	def    snake_case__(						cls:						Optional[Any],					*lowerCamelCase_:						Tuple,					**lowerCamelCase_:						Optional[Any]			):
			requires_backends(cls,					['note_seq']			)





	@classmethod
	def    snake_case__(						cls:						Any,					*lowerCamelCase_:						Dict,					**lowerCamelCase_:						str			):
			requires_backends(cls,					['note_seq']			)


