


"""simple docstring"""


def  __snake_case       (   UpperCamelCase__	)      ->		int:







		"""simple docstring"""





		if not grid or not grid[0]:
				raise TypeError('The grid does not contain the appropriate information'	)

		for cell_n in range(1 ,			len(grid[0]	)	):
				grid[0][cell_n] += grid[0][cell_n - 1]
		A					       = grid[0]

		for row_n in range(1 ,			len(UpperCamelCase__	)	):
				A					       = grid[row_n]
				A					       = fill_row(UpperCamelCase__ ,			UpperCamelCase__	)
				A					       = grid[row_n]

		return grid[-1][-1]







def  __snake_case       (   UpperCamelCase__ ,			UpperCamelCase__	)      ->		list:







		"""simple docstring"""





		current_row[0] += row_above[0]
		for cell_n in range(1 ,			len(UpperCamelCase__	)	):
				current_row[cell_n] += min(current_row[cell_n - 1] ,			row_above[cell_n]	)

		return current_row


if __name__ == "__main__":
	import doctest

	doctest.testmod()









"""simple docstring"""


from math import sqrt







def  __snake_case       (   UpperCamelCase__	)      ->		int:







		"""simple docstring"""





		A					       = 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  __snake_case       (   UpperCamelCase__ = 10000	)      ->		int:







		"""simple docstring"""





		A					       = 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())))





