



'''simple docstring'''






def  lowerCamelCase__			(		_A					,     _A							):
  a		:   List[Any]	  =	1  # To kept the Calculated Value
  # Since C(n, k) = C(n, n-k)
  if k > (n - k):
    a		:   str	  =	n - k
  # Calculate C(n,k)
  for i in range(UpperCamelCase_							):
    result *= n - i
    result //= i + 1
  return result
def  lowerCamelCase__			(		_A							):
  return binomial_coefficient(2 * node_count					,     UpperCamelCase_							) // (node_count + 1)
def  lowerCamelCase__			(		_A							):






  if n < 0:
    raise ValueError('factorial() not defined for negative values'							)
  a		:   str	  =	1
  for i in range(1					,     n + 1							):
    result *= i
  return result
def  lowerCamelCase__			(		_A							):
  return catalan_number(UpperCamelCase_							) * factorial(UpperCamelCase_							)


if __name__ == "__main__":
     lowerCAmelCase:   List[Any]					=		int(input('Enter the number of nodes: ').strip() or 0)
     if node_count <= 0:
          raise ValueError('We need some nodes to work with.')
     print(
         F"Given {node_count} nodes, there are {binary_tree_count(node_count)} "
         F"binary trees and {catalan_number(node_count)} binary search trees."
     )



class     A__   :







    """simple docstring"""

    def __init__(			self     ,   __snake_case       ):
         snake_case											=							n
         snake_case											=							[None] * self.n
         snake_case											=							0  # index of the first element
         snake_case											=							0
         snake_case											=							0
    def __len__(			self       ):
         return self.size
    def 						a_     (			self       ):
         return self.size == 0
    def 						a_     (			self       ):
         return False if self.is_empty() else self.array[self.front]
    def 						a_     (			self     ,   __snake_case       ):
         if self.size >= self.n:
              raise Exception('''QUEUE IS FULL'''       )

         snake_case											=							data
         snake_case											=							(self.rear + 1) % self.n
         self.size += 1
         return self




    def 						a_     (			self       ):
         if self.size == 0:
              raise Exception('''UNDERFLOW'''       )

         snake_case											=							self.array[self.front]
         snake_case											=							None
         snake_case											=							(self.front + 1) % self.n
         self.size -= 1
         return temp




