






"""simple docstring"""



from __future__ import annotations

class 	a					:







    def __init__(      self							,		_lowerCamelCase	):
         lowercase							   =	data
         lowercase							   =	None


class 	a					:







    def __init__(      self	):
         lowercase							   =	None







    def       UpperCamelCase_				(      self							,		_lowerCamelCase	):
         lowercase							   =	Node(SCREAMING_SNAKE_CASE_	)
         lowercase							   =	self.head
         lowercase							   =	new_node
         return self.head.data







    def       UpperCamelCase_				(      self	):
         lowercase							   =	self.head
         lowercase							   =	self.head
         if self.head:
              while fast_pointer and fast_pointer.next:
                   lowercase							   =	fast_pointer.next.next
                   lowercase							   =	slow_pointer.next
              return slow_pointer.data
         else:
              print('No element found.'	)
              return None


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










"""simple docstring"""



def 						_SCREAMING_SNAKE_CASE			(   __snake_case      :  Dict		, __snake_case      :  str   ):





  '''simple docstring'''





  lowercase							   =	1
  while b > 0:
    if b & 1:
      res *= a

    a *= a
    b >>= 1

  return res
def 						_SCREAMING_SNAKE_CASE			(   __snake_case      :  int		, __snake_case      :  List[str]		, __snake_case      :  str   ):





  '''simple docstring'''





  lowercase							   =	1
  while b > 0:
    if b & 1:
      lowercase							   =	((res % c) * (a % c)) % c

    a *= a
    b >>= 1

  return res


