
from math import sqrt




def  __magic_name__ (   __lowerCAmelCase	:						int							)			->   int:
				__lowerCamelCase    					=	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  __magic_name__ (   __lowerCAmelCase	:						int = 1_0000							)			->   int:
				__lowerCamelCase    					=	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())))





import pprint

import requests

SCREAMING_SNAKE_CASE__   :			str												=    "https://zenquotes.io/api"




def  __magic_name__ (   )			->   list:
				return requests.get(API_ENDPOINT_URL + '''/today'''							).json()




def  __magic_name__ (   )			->   list:
				return requests.get(API_ENDPOINT_URL + '''/random'''							).json()


if __name__ == "__main__":
					SCREAMING_SNAKE_CASE__   :			int												=    random_quotes()
					pprint.pprint(response)



