




import sys




def      __magic_name__							(					A						:   Dict,    A						:   Dict  ):






			'''simple docstring'''







			if not numbers:
						return 0
			if target == 0 and target in numbers:
						return 0
			if not isinstance(A,    (list, tuple)  ) or not all(
			    isinstance(A,    A  ) for number in numbers  ):
						raise ValueError("numbers must be an iterable of integers"  )

			a       =     0
			a       =     sys.maxsize

			while right < len(A  ):
						curr_sum += numbers[right]
						while curr_sum >= target and left <= right:
									a       =     min(A,    right - left + 1  )
									curr_sum -= numbers[left]
									left += 1
						right += 1

			return 0 if min_len == sys.maxsize else min_len












from __future__ import annotations

class   UpperCAmelCase    :






   def __init__(						self :							List[Any]    ,       UpperCamelCase_ :							int  )->      None:
     _lowercase:			Optional[Any]      =     data
     _lowercase:			Optional[int]      =     None

class   UpperCAmelCase    :






   def __init__(						self :							Optional[Any]  )->      Union[str, Any]:
     _lowercase:			List[str]      =     None






   def 			_a    (						self :							List[Any]    ,       UpperCamelCase_ :							int  )->      int:
     _lowercase:			Any      =     Node(UpperCamelCase_  )
     _lowercase:			List[Any]      =     self.head
     _lowercase:			List[str]      =     new_node
     return self.head.data






   def 			_a    (						self :							Tuple  )->      int | None:
     _lowercase:			List[str]      =     self.head
     _lowercase:			str      =     self.head
     if self.head:
       while fast_pointer and fast_pointer.next:
         _lowercase:			Optional[int]      =     fast_pointer.next.next
         _lowercase:			Tuple      =     slow_pointer.next
       return slow_pointer.data
     else:
       print('No element found.'  )
       return None


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