





import operator





def      _lowercase					(						_UpperCAmelCase			,      _UpperCAmelCase = False			,      _UpperCAmelCase = None				)						->  list:
				lowerCamelCase	 =operator.lt if reverse else operator.gt
				lowerCamelCase	 =solution or []

				if not arr:
								return solution

				lowerCamelCase	 =[arr.pop(0				)]
				for i, item in enumerate(_UpperCAmelCase				):
								if _operator(_UpperCAmelCase			,      sublist[-1]				):
												sublist.append(_UpperCAmelCase				)
												arr.pop(_UpperCAmelCase				)

    #  merging sublist into solution list
				if not solution:
								solution.extend(_UpperCAmelCase				)
				else:
								while sublist:
												lowerCamelCase	 =sublist.pop(0				)
												for i, xx in enumerate(_UpperCAmelCase				):
																if not _operator(_UpperCAmelCase			,      _UpperCAmelCase				):
																				solution.insert(_UpperCAmelCase			,      _UpperCAmelCase				)
																				break
												else:
																solution.append(_UpperCAmelCase				)

				strand_sort(_UpperCAmelCase			,      _UpperCAmelCase			,      _UpperCAmelCase				)
				return solution


if __name__ == "__main__":
							assert strand_sort([4, 3, 5, 1, 2]) == [1, 2, 3, 4, 5]
							assert strand_sort([4, 3, 5, 1, 2], reverse=True) == [5, 4, 3, 2, 1]












from math import sqrt





def      _lowercase					(						_UpperCAmelCase				)						->  int:
				lowerCamelCase	 =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      _lowercase					(						_UpperCAmelCase = 1_00_00				)						->  int:
				lowerCamelCase	 =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())))





