


"""simple docstring"""







from math import sqrt
def  a__      (    SCREAMING_SNAKE_CASE   :   Optional[Any]    ):


		'''simple docstring'''







		lowerCAmelCase					:					Dict								=							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  a__      (    SCREAMING_SNAKE_CASE   :   Any = 1_0_0_0_0    ):


		'''simple docstring'''







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









"""simple docstring"""







import baseaa
def  a__      (    SCREAMING_SNAKE_CASE   :   str    ):


  '''simple docstring'''







  return baseaa.baaencode(string.encode("utf-8"    )    )
def  a__      (    SCREAMING_SNAKE_CASE   :   bytes    ):


  '''simple docstring'''







  return baseaa.baadecode(SCREAMING_SNAKE_CASE    ).decode("utf-8"    )


if __name__ == "__main__":
     lowerCAmelCase__				    =       '''Hello World!'''
     lowerCAmelCase__				    =       baseaa_encode(test)
     print(encoded)

     lowerCAmelCase__				    =       baseaa_decode(encoded)
     print(decoded)





