




import sys


def 		_lowerCamelCase					(       UpperCamelCase       ,  UpperCamelCase				)      ->		int:





  """simple docstring"""





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

  _lowercase:			Dict      =     0
  _lowercase:			List[Any]      =     sys.maxsize

  while right < len(UpperCamelCase				):
    curr_sum += numbers[right]
    while curr_sum >= target and left <= right:
      _lowercase:			List[Any]      =     min(UpperCamelCase       ,  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())
