

from math import sqrt






def        snake_case__		(    lowerCamelCase_		):
							A      :					int      		=					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        snake_case__		(    lowerCamelCase_ = 10000		):
							A      :					Union[str, Any]      		=					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 string
from math import logaa






def        snake_case__		(    lowerCamelCase_     ,				lowerCamelCase_		):
							A      :					List[str]      		=					document.translate(
							    str.maketrans(''''''     ,				''''''     ,				string.punctuation		)		).replace('''\n'''     ,				''''''		)
							A      :					Optional[int]      		=					document_without_punctuation.split(''' '''		)  # word tokenization
							return len([word for word in tokenize_document if word.lower() == term.lower()]		)






def        snake_case__		(    lowerCamelCase_     ,				lowerCamelCase_		):
							A      :					Dict      		=					corpus.lower().translate(
							    str.maketrans(''''''     ,				''''''     ,				string.punctuation		)		)  # strip all punctuation and replace it with ''
							A      :					Dict      		=					corpus_without_punctuation.split('''\n'''		)
							A      :					List[Any]      		=					term.lower()
							return (len([doc for doc in docs if term in doc]		), len(lowerCamelCase_		))






def        snake_case__		(    lowerCamelCase_     ,				lowerCamelCase_     ,				lowerCamelCase_=False		):
							if smoothing:
														if n == 0:
																					raise ValueError('''log10(0) is undefined.'''		)
														return round(1 + logaa(n / (1 + df)		)     ,				3		)

							if df == 0:
														raise ZeroDivisionError('''df must be > 0'''		)
							elif n == 0:
														raise ValueError('''log10(0) is undefined.'''		)
							return round(logaa(n / df		)     ,				3		)






def        snake_case__		(    lowerCamelCase_     ,				lowerCamelCase_		):
							return round(tf * idf     ,				3		)






