

from __future__ import annotations

class __UpperCamelCase    :






					'''simple docstring'''



					def __init__(							self							,			lowerCamelCase__	):
						UpperCAmelCase__:  Any		       =   data
						UpperCAmelCase__:  List[Any]		       =   None

class __UpperCamelCase    :






					'''simple docstring'''



					def __init__(							self	):
						UpperCAmelCase__:  Any		       =   None





					def       _UpperCAmelCase						(							self							,			lowerCamelCase__	):
						UpperCAmelCase__:  Dict		       =   Node(lowerCamelCase__	)
						UpperCAmelCase__:  Tuple		       =   self.head
						UpperCAmelCase__:  Tuple		       =   new_node
						return self.head.data





					def       _UpperCAmelCase						(							self	):
						UpperCAmelCase__:  Optional[Any]		       =   self.head
						UpperCAmelCase__:  Tuple		       =   self.head
						if self.head:
							while fast_pointer and fast_pointer.next:
								UpperCAmelCase__:  str		       =   fast_pointer.next.next
								UpperCAmelCase__:  List[str]		       =   slow_pointer.next
							return slow_pointer.data
						else:
							print("No element found."	)
							return None


if __name__ == "__main__":
					_lowerCAmelCase     :			List[Any]    =LinkedList()
					for _ in range(int(input().strip())):
										_lowerCAmelCase     :			List[Any]    =int(input().strip())
										link.push(data)
					print(link.middle_element())






_lowerCAmelCase     :			Optional[int]    ={
    """+""": lambda x, y: x + y,
    """-""": lambda x, y: x - y,
    """*""": lambda x, y: x * y,
    """/""": lambda x, y: x / y,
}



def  _A  (			SCREAMING_SNAKE_CASE			):
	return c.isdigit()



def  _A  (			SCREAMING_SNAKE_CASE			):
	UpperCAmelCase__:  str		       =   []

	# iterate over the string in reverse order
	for c in expression.split()[::-1]:
		# push operand to stack
		if is_operand(SCREAMING_SNAKE_CASE			):
			stack.append(int(SCREAMING_SNAKE_CASE			)			)

		else:
			# pop values from stack can calculate the result
			# push the result onto the stack again
			UpperCAmelCase__:  Any		       =   stack.pop()
			UpperCAmelCase__:  int		       =   stack.pop()
			stack.append(calc[c](SCREAMING_SNAKE_CASE  ,SCREAMING_SNAKE_CASE			)			)

	return stack.pop()


# Driver code
if __name__ == "__main__":
					_lowerCAmelCase     :			Optional[int]    ="""+ 9 * 2 6"""
					print(evaluate(test_expression))

					_lowerCAmelCase     :			Optional[Any]    ="""/ * 10 2 + 4 1 """
					print(evaluate(test_expression))