



from __future__ import annotations



class 						_snake_case :





 """simple docstring"""



 def __init__(  self		,      a   )		->							Union[str, Any]:




   """simple docstring"""







   _A          =      data
   _A          =      None







class 						_snake_case :





 """simple docstring"""



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




   """simple docstring"""







   _A          =      None
 def lowercase_						(  self		,      a   )		->							int:




   """simple docstring"""







   _A          =      Node(__UpperCamelCase   )
   _A          =      self.head
   _A          =      new_node
   return self.head.data



 def lowercase_						(  self   )		->							Any:




   """simple docstring"""







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


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




from __future__ import annotations




def       UpperCAmelCase__	(							__snake_case  ,			__snake_case  ,			__snake_case  ,			__snake_case							)				->	int:

  # Base Case
  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(__snake_case  ,			__snake_case  ,			__snake_case  ,			counter - 1							)
  else:
    _A          =      capacity - weights[counter - 1]
    _A          =      values[counter - 1] + knapsack(
        __snake_case  ,			__snake_case  ,			__snake_case  ,			counter - 1							)
    _A          =      knapsack(__snake_case  ,			__snake_case  ,			__snake_case  ,			counter - 1							)
    return max(__snake_case  ,			__snake_case							)


if __name__ == "__main__":
    import doctest

    doctest.testmod()