

"""simple docstring"""




def 	UpperCAmelCase__   (				A__	,    A__   )      ->      int:




   """simple docstring"""
   lowerCamelCase__						=			1  # To kept the Calculated Value
   # Since C(n, k) = C(n, n-k)
   if k > (n - k):
      lowerCamelCase__						=			n - k
   # Calculate C(n,k)
   for i in range(A__   ):
      result *= n - i
      result //= i + 1
   return result



def 	UpperCAmelCase__   (				A__   )      ->      int:




   """simple docstring"""
   return binomial_coefficient(2 * node_count	,    A__   ) // (node_count + 1)



def 	UpperCAmelCase__   (				A__   )      ->      int:




   """simple docstring"""
   if n < 0:
      raise ValueError("factorial() not defined for negative values"   )
   lowerCamelCase__						=			1
   for i in range(1	,    n + 1   ):
      result *= i
   return result



def 	UpperCAmelCase__   (				A__   )      ->      int:




   """simple docstring"""
   return catalan_number(A__   ) * factorial(A__   )


if __name__ == "__main__":
     SCREAMING_SNAKE_CASE_     :			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.'''
     )







"""simple docstring"""




def 	UpperCAmelCase__   (				A__   )      ->      str:




   """simple docstring"""
   return " ".join(input_str.split()[::-1]   )


if __name__ == "__main__":
     import doctest

     doctest.testmod()




