from __future__ import annotations

class 				_lowercase						:






    '''simple docstring'''




    def __init__(						self					,	lowerCamelCase__   ):
       lowerCAmelCase_:       Tuple         =  data
       lowerCAmelCase_:       str         =  None





class 				_lowercase						:






    '''simple docstring'''




    def __init__(						self   ):
       lowerCAmelCase_:       Dict         =  None




    def     _a						(						self					,	lowerCamelCase__   ):
       lowerCAmelCase_:       Union[str, Any]         =  Node(lowerCamelCase__   )
       lowerCAmelCase_:       Any         =  self.head
       lowerCAmelCase_:       Any         =  new_node
       return self.head.data




    def     _a						(						self   ):
       lowerCAmelCase_:       int         =  self.head
       lowerCAmelCase_:       Optional[int]         =  self.head
       if self.head:
          while fast_pointer and fast_pointer.next:
             lowerCAmelCase_:       Tuple         =  fast_pointer.next.next
             lowerCAmelCase_:       int         =  slow_pointer.next
          return slow_pointer.data
       else:
          print("No element found."   )
          return None


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




import itertools
def 		snake_case__  (		lowercase				):
   return (
       int("".join(combination[0:2]				)				) * int("".join(combination[2:5]				)				)
       == int("".join(combination[5:9]				)				)
   ) or (
       int("".join(combination[0]				)				) * int("".join(combination[1:5]				)				)
       == int("".join(combination[5:9]				)				)
   )
def 		snake_case__  (		):
   return sum(
       {
           int("".join(pandigital[5:9]				)				)
           for pandigital in itertools.permutations("123456789"				)
           if is_combination_valid(lowercase				)
       }				)


if __name__ == "__main__":
 print(solution())