




"""simple docstring"""
from __future__ import annotations

def 				lowercase      (_lowerCAmelCase				,  _lowerCAmelCase				,  _lowerCAmelCase				,  _lowerCAmelCase		):

						if counter == 0 or capacity == 0:
												return 0

						# If weight of the nth item is more than Knapsack of capacity,
						#   then this item cannot be included in the optimal solution,
						# else return the maximum of two cases:
						#   (1) nth item included
						#   (2) not included
						if weights[counter - 1] > capacity:
												return knapsack(_lowerCAmelCase				,  _lowerCAmelCase				,  _lowerCAmelCase				,  counter - 1		)
						else:
												__lowerCAmelCase        =       capacity - weights[counter - 1]
												__lowerCAmelCase        =       values[counter - 1] + knapsack(
												    _lowerCAmelCase				,  _lowerCAmelCase				,  _lowerCAmelCase				,  counter - 1		)
												__lowerCAmelCase        =       knapsack(_lowerCAmelCase				,  _lowerCAmelCase				,  _lowerCAmelCase				,  counter - 1		)
												return max(_lowerCAmelCase				,  _lowerCAmelCase		)


if __name__ == "__main__":
			import doctest

			doctest.testmod()


"""simple docstring"""
from __future__ import annotations
class      lowerCAmelCase_						:



							'''simple docstring'''





							def __init__(				self  ,							snake_case_							)   ->       None:
													__lowerCAmelCase        =       data
													__lowerCAmelCase        =       None
class      lowerCAmelCase_						:



							'''simple docstring'''





							def __init__(				self							)   ->       List[str]:
													__lowerCAmelCase        =       None




							def  A__		(				self  ,							snake_case_							)   ->       int:
													__lowerCAmelCase        =       Node(snake_case_							)
													__lowerCAmelCase        =       self.head
													__lowerCAmelCase        =       new_node
													return self.head.data




							def  A__		(				self							)   ->       int | None:
													__lowerCAmelCase        =       self.head
													__lowerCAmelCase        =       self.head
													if self.head:
																			while fast_pointer and fast_pointer.next:
																									__lowerCAmelCase        =       fast_pointer.next.next
																									__lowerCAmelCase        =       slow_pointer.next
																			return slow_pointer.data
													else:
																			print("""No element found."""							)
																			return None


if __name__ == "__main__":
			SCREAMING_SNAKE_CASE_			      =					LinkedList()
			for _ in range(int(input().strip())):
						SCREAMING_SNAKE_CASE_			      =					int(input().strip())
						link.push(data)
			print(link.middle_element())
