



'''simple docstring'''
from math import sqrt






def A__    (     UpperCAmelCase_							):
						_UpperCamelCase					:		Any 				=   0
						for i in range(1  ,  int(sqrt(UpperCAmelCase_							) + 1							)							):
												if n % i == 0 and i != sqrt(UpperCAmelCase_							):
																		total += i + n // i
												elif i == sqrt(UpperCAmelCase_							):
																		total += i
						return total - n






def A__    (     UpperCAmelCase_ = 1_0_0_0_0							):
						_UpperCamelCase					:		str 				=   sum(
						    i
						    for i in range(1  ,  UpperCAmelCase_							)
						    if sum_of_divisors(sum_of_divisors(UpperCAmelCase_							)							) == i and sum_of_divisors(UpperCAmelCase_							) != i							)
						return total


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




import requests


def       A       (					lowercase    ,       lowercase )   ->  None:
		'''simple docstring'''

		UpperCamelCase		=     {'Content-Type': 'application/json'}
		UpperCamelCase		=     requests.post(lowercase    ,       json={'text': message_body}    ,       headers=lowercase )
		if response.status_code != 200:
				UpperCamelCase		=     (
				    'Request to slack returned an error '
				    f'''{response.status_code}, the response is:\n{response.text}'''
				)
				raise ValueError(lowercase )


if __name__ == "__main__":
					# Set the slack url to the one provided by Slack when you create the webhook at
					# https://my.slack.com/services/new/incoming-webhook/
					send_slack_message("<YOUR MESSAGE BODY>", "<SLACK CHANNEL URL>")
