


from math import sqrt






def  UpperCamelCase					(	__magic_name__     :							int     )   ->  int:
		"""simple docstring"""




		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  UpperCamelCase					(	__magic_name__     :							int = 1_0000     )   ->  int:
		"""simple docstring"""




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



from ...utils import (
    OptionalDependencyNotAvailable,
    is_torch_available,
    is_transformers_available,
    is_transformers_version,
)


try:
					if not (is_transformers_available() and is_torch_available() and is_transformers_version(">=", "4.25.0")):
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					from ...utils.dummy_torch_and_transformers_objects import UnCLIPImageVariationPipeline, UnCLIPPipeline
else:
					from .pipeline_unclip import UnCLIPPipeline
					from .pipeline_unclip_image_variation import UnCLIPImageVariationPipeline
					from .text_proj import UnCLIPTextProjModel



