from __future__ import annotations



class    lowercase_    :



							def __init__(						self      ,				lowercase_				):
													_snake_case						:     Optional[Any]				=    data
													_snake_case						:     Optional[Any]				=    None




class    lowercase_    :



							def __init__(						self				):
													_snake_case						:     List[Any]				=    None



							def        UpperCamelCase       (						self      ,				lowercase_				):
													_snake_case						:     str				=    Node(lowercase_				)
													_snake_case						:     Union[str, Any]				=    self.head
													_snake_case						:     List[Any]				=    new_node
													return self.head.data



							def        UpperCamelCase       (						self				):
													_snake_case						:     int				=    self.head
													_snake_case						:     str				=    self.head
													if self.head:
																			while fast_pointer and fast_pointer.next:
																									_snake_case						:     Dict				=    fast_pointer.next.next
																									_snake_case						:     Optional[int]				=    slow_pointer.next
																			return slow_pointer.data
													else:
																			print("No element found."				)
																			return None


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




def        __a     (    lowerCAmelCase_   :					int				)      -> int:






						'''simple docstring'''



						if number != int(lowerCAmelCase_				):
												raise ValueError("""factorial() only accepts integral values"""				)
						if number < 0:
												raise ValueError("""factorial() not defined for negative values"""				)
						UpperCAmelCase_=   1
						for i in range(1			,number + 1				):
												value *= i
						return value



def        __a     (    lowerCAmelCase_   :					int				)      -> int:






						'''simple docstring'''



						if not isinstance(lowerCAmelCase_			,lowerCAmelCase_				):
												raise ValueError("""factorial() only accepts integral values"""				)
						if n < 0:
												raise ValueError("""factorial() not defined for negative values"""				)
						return 1 if n == 0 or n == 1 else n * factorial(n - 1				)


if __name__ == "__main__":
	import doctest

	doctest.testmod()

	__A				    =						int(input('''Enter a positive integer: ''').strip() or 0)
	print(f'factorial{n} is {factorial(n)}')




