




"""simple docstring"""
import functools
from math import sqrt
from time import time

def 				lowercase      (_lowerCAmelCase				,  *_lowerCAmelCase				,  **_lowerCAmelCase		):
						__lowerCAmelCase        =       time()
						__lowerCAmelCase        =       func(*_lowerCAmelCase				,  **_lowerCAmelCase		)
						__lowerCAmelCase        =       time()
						if int(end - start		) > 0:
												print(f"""{func.__name__} runtime: {(end - start):0.4f} s"""		)
						else:
												print(f"""{func.__name__} runtime: {(end - start) * 1000:0.4f} ms"""		)
						return output

def 				lowercase      (_lowerCAmelCase		):
						if n < 0:
												raise Exception("""n is negative"""		)
						if n == 0:
												return [0]
						__lowerCAmelCase        =       [0, 1]
						for _ in range(n - 1		):
												fib.append(fib[-1] + fib[-2]		)
						return fib

def 				lowercase      (_lowerCAmelCase		):

						def fib_recursive_term(_lowerCAmelCase		) -> int:
												if i < 0:
																		raise Exception("""n is negative"""		)
												if i < 2:
																		return i
												return fib_recursive_term(i - 1		) + fib_recursive_term(i - 2		)

						if n < 0:
												raise Exception("""n is negative"""		)
						return [fib_recursive_term(_lowerCAmelCase		) for i in range(n + 1		)]

def 				lowercase      (_lowerCAmelCase		):

						@functools.cache
						def fib_recursive_term(_lowerCAmelCase		) -> int:
												if i < 0:
																		raise Exception("""n is negative"""		)
												if i < 2:
																		return i
												return fib_recursive_term(i - 1		) + fib_recursive_term(i - 2		)

						if n < 0:
												raise Exception("""n is negative"""		)
						return [fib_recursive_term(_lowerCAmelCase		) for i in range(n + 1		)]

def 				lowercase      (_lowerCAmelCase		):
						if n < 0:
												raise Exception("""n is negative"""		)
						# Cache must be outside recursuive function
						# other it will reset every time it calls itself.
						__lowerCAmelCase        =       {0: 0, 1: 1, 2: 1}  # Prefilled cache

						def rec_fn_memoized(_lowerCAmelCase		) -> int:
												if num in cache:
																		return cache[num]

												__lowerCAmelCase        =       rec_fn_memoized(num - 1		) + rec_fn_memoized(num - 2		)
												__lowerCAmelCase        =       value
												return value

						return [rec_fn_memoized(_lowerCAmelCase		) for i in range(n + 1		)]

def 				lowercase      (_lowerCAmelCase		):
						if n < 0:
												raise Exception("""n is negative"""		)
						if n >= 1475:
												raise Exception("""n is too large"""		)
						__lowerCAmelCase        =       sqrt(5		)
						__lowerCAmelCase        =       (1 + sqrt_a) / 2
						return [round(phi**i / sqrt_a		) for i in range(n + 1		)]


if __name__ == "__main__":
			SCREAMING_SNAKE_CASE_			      =					30
			time_func(fib_iterative, num)
			time_func(fib_recursive, num)  # Around 3s runtime
			time_func(fib_recursive_cached, num)  # Around 0ms runtime
			time_func(fib_memoization, num)
			time_func(fib_binet, num)


"""simple docstring"""
from __future__ import annotations
class      lowerCAmelCase_						:



							'''simple docstring'''





							def __init__(				self  ,							snake_case_							)   ->       None:
													__lowerCAmelCase        =       data
													__lowerCAmelCase        =       None
class      lowerCAmelCase_						:



							'''simple docstring'''





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




							def  A__		(				self  ,							snake_case_							)   ->       int:
													__lowerCAmelCase        =       Node(snake_case_							)
													__lowerCAmelCase        =       self.head
													__lowerCAmelCase        =       new_node
													return self.head.data




							def  A__		(				self							)   ->       int | None:
													__lowerCAmelCase        =       self.head
													__lowerCAmelCase        =       self.head
													if self.head:
																			while fast_pointer and fast_pointer.next:
																									__lowerCAmelCase        =       fast_pointer.next.next
																									__lowerCAmelCase        =       slow_pointer.next
																			return slow_pointer.data
													else:
																			print("""No element found."""							)
																			return None


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