






from math import sqrt

def   __lowercase       (			snake_case			):







				"""simple docstring"""






				__magic_name__		:Tuple   =   0
				for i in range(1,	int(sqrt(snake_case			) + 1			)			):
								if n % i == 0 and i != sqrt(snake_case			):
												total += i + n // i
								elif i == sqrt(snake_case			):
												total += i
				return total - n

def   __lowercase       (			snake_case = 1_0_0_0_0			):







				"""simple docstring"""






				__magic_name__		:List[str]   =   sum(
				    i
				    for i in range(1,	snake_case			)
				    if sum_of_divisors(sum_of_divisors(snake_case			)			) == i and sum_of_divisors(snake_case			) != i			)
				return total


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











'''simple docstring'''

from __future__ import annotations

SCREAMING_SNAKE_CASE__     :						List[Any]	=  1.6021e-19  # units = C






def 				a  (     UpperCamelCase_    :    float      ,					UpperCamelCase_    :    float      ,					UpperCamelCase_    :    float      ,					)       ->	tuple[str, float]:
		if (conductivity, electron_conc, mobility).count(0			) != 1:
				raise ValueError('You cannot supply more or less than 2 values'			)
		elif conductivity < 0:
				raise ValueError('Conductivity cannot be negative'			)
		elif electron_conc < 0:
				raise ValueError('Electron concentration cannot be negative'			)
		elif mobility < 0:
				raise ValueError('mobility cannot be negative'			)
		elif conductivity == 0:
				return (
				    "conductivity",
				    mobility * electron_conc * ELECTRON_CHARGE,
				)
		elif electron_conc == 0:
				return (
				    "electron_conc",
				    conductivity / (mobility * ELECTRON_CHARGE),
				)
		else:
				return (
				    "mobility",
				    conductivity / (electron_conc * ELECTRON_CHARGE),
				)


if __name__ == "__main__":
			import doctest

			doctest.testmod()




