

'''simple docstring'''
def 	_lowerCAmelCase (						_UpperCamelCase						:					int							,			_UpperCamelCase						:					int    )				->      int:
     """simple docstring"""




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


def 	_lowerCAmelCase (						_UpperCamelCase						:					int    )				->      int:
     """simple docstring"""




     return binomial_coefficient(2 * node_count							,			_UpperCamelCase    ) // (node_count + 1)


def 	_lowerCAmelCase (						_UpperCamelCase						:					int    )				->      int:
     """simple docstring"""




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


def 	_lowerCAmelCase (						_UpperCamelCase						:					int    )				->      int:
     """simple docstring"""




     return catalan_number(_UpperCamelCase    ) * factorial(_UpperCamelCase    )


if __name__ == "__main__":
     lowerCamelCase			:				str 			=					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 	_lowerCAmelCase (						_UpperCamelCase						:					str    )				->      bool:
     """simple docstring"""




     _SCREAMING_SNAKE_CASE							   =0
     for ch in input_str:
          _SCREAMING_SNAKE_CASE							   =ord(_UpperCamelCase    )
          _SCREAMING_SNAKE_CASE							   =pow(2							,			_UpperCamelCase    )

          # If we already turned on bit for current character's unicode
          if bitmap >> ch_unicode & 1 == 1:
               return False
          bitmap |= ch_bit_index_on
     return True


if __name__ == "__main__":
     import doctest

     doctest.testmod()
