





'''simple docstring'''




def 		__A		(  lowerCamelCase_			,			lowerCamelCase_	):


		"""simple docstring"""



		SCREAMING_SNAKE_CASE :				list[list[str]]		=			[[] for _ in range(lowerCamelCase_	)]
		SCREAMING_SNAKE_CASE :				int		=			key - 1

		if key <= 0:
				raise ValueError("""Height of grid can't be 0 or negative"""	)
		if key == 1 or len(lowerCamelCase_	) <= key:
				return input_string

		for position, character in enumerate(lowerCamelCase_	):
				SCREAMING_SNAKE_CASE :				Dict		=			position % (lowest * 2)  # puts it in bounds
				SCREAMING_SNAKE_CASE :				str		=			min(lowerCamelCase_			,			lowest * 2 - num	)  # creates zigzag pattern
				temp_grid[num].append(lowerCamelCase_	)
		SCREAMING_SNAKE_CASE :				Any		=			["""""".join(lowerCamelCase_	) for row in temp_grid]
		SCREAMING_SNAKE_CASE :				Dict		=			"""""".join(lowerCamelCase_	)

		return output_string



def 		__A		(  lowerCamelCase_			,			lowerCamelCase_	):


		"""simple docstring"""



		SCREAMING_SNAKE_CASE :				Optional[int]		=			[]
		SCREAMING_SNAKE_CASE :				List[str]		=			key - 1

		if key <= 0:
				raise ValueError("""Height of grid can't be 0 or negative"""	)
		if key == 1:
				return input_string

		SCREAMING_SNAKE_CASE :				list[list[str]]		=			[[] for _ in range(lowerCamelCase_	)]  # generates template
		for position in range(len(lowerCamelCase_	)	):
				SCREAMING_SNAKE_CASE :				int		=			position % (lowest * 2)  # puts it in bounds
				SCREAMING_SNAKE_CASE :				str		=			min(lowerCamelCase_			,			lowest * 2 - num	)  # creates zigzag pattern
				temp_grid[num].append("""*"""	)

		SCREAMING_SNAKE_CASE :				Dict		=			0
		for row in temp_grid:  # fills in the characters
				SCREAMING_SNAKE_CASE :				Optional[int]		=			input_string[counter : counter + len(lowerCamelCase_	)]
				grid.append(list(lowerCamelCase_	)	)
				counter += len(lowerCamelCase_	)

		SCREAMING_SNAKE_CASE :				Optional[Any]		=			""""""  # reads as zigzag
		for position in range(len(lowerCamelCase_	)	):
				SCREAMING_SNAKE_CASE :				Dict		=			position % (lowest * 2)  # puts it in bounds
				SCREAMING_SNAKE_CASE :				str		=			min(lowerCamelCase_			,			lowest * 2 - num	)  # creates zigzag pattern
				output_string += grid[num][0]
				grid[num].pop(0	)
		return output_string



def 		__A		(  lowerCamelCase_	):


		"""simple docstring"""



		SCREAMING_SNAKE_CASE :				Union[str, Any]		=			{}
		for key_guess in range(1			,			len(lowerCamelCase_	)	):  # tries every key
				SCREAMING_SNAKE_CASE :				Dict		=			decrypt(lowerCamelCase_			,			lowerCamelCase_	)
		return results


if __name__ == "__main__":
							import doctest

							doctest.testmod()










'''simple docstring'''




from math import sqrt



def 		__A		(  lowerCamelCase_	):


		"""simple docstring"""



		SCREAMING_SNAKE_CASE :				str		=			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 		__A		(  lowerCamelCase_ = 1_00_00	):


		"""simple docstring"""



		SCREAMING_SNAKE_CASE :				str		=			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())))



