



'''simple docstring'''

def 					__lowerCamelCase					(				lowerCAmelCase_						,      lowerCAmelCase_  )      ->				str:
		_a					:				list[list[str]]				=							[[] for _ in range(lowerCAmelCase_  )]
		_a					:				Optional[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_  ):
				_a					:				List[Any]				=							position % (lowest * 2)  # puts it in bounds
				_a					:				Optional[int]				=							min(lowerCAmelCase_						,      lowest * 2 - num  )  # creates zigzag pattern
				temp_grid[num].append(lowerCAmelCase_  )
		_a					:				Optional[Any]				=							[''.join(lowerCAmelCase_  ) for row in temp_grid]
		_a					:				Any				=							''.join(lowerCAmelCase_  )

		return output_string



def 					__lowerCamelCase					(				lowerCAmelCase_						,      lowerCAmelCase_  )      ->				str:
		_a					:				Any				=							[]
		_a					:				int				=							key - 1

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

		_a					:				list[list[str]]				=							[[] for _ in range(lowerCAmelCase_  )]  # generates template
		for position in range(len(lowerCAmelCase_  )  ):
				_a					:				Union[str, Any]				=							position % (lowest * 2)  # puts it in bounds
				_a					:				Any				=							min(lowerCAmelCase_						,      lowest * 2 - num  )  # creates zigzag pattern
				temp_grid[num].append('*'  )

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

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



def 					__lowerCamelCase					(				lowerCAmelCase_  )      ->				dict[int, str]:
		_a					:				Any				=							{}
		for key_guess in range(1						,      len(lowerCAmelCase_  )  ):  # tries every key
				_a					:				Optional[int]				=							decrypt(lowerCAmelCase_						,      lowerCAmelCase_  )
		return results


if __name__ == "__main__":
							import doctest

							doctest.testmod()









'''simple docstring'''

from math import sqrt



def 					__lowerCamelCase					(				lowerCAmelCase_  )      ->				int:
		_a					:				Dict				=							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 					__lowerCamelCase					(				lowerCAmelCase_ = 10000  )      ->				int:
		_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())))




