



def    _snake_case (       __snake_case					,  __snake_case    )     ->     int:






      '''simple docstring'''







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







def    _snake_case (       __snake_case    )     ->     int:






      '''simple docstring'''







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







def    _snake_case (       __snake_case    )     ->     int:






      '''simple docstring'''







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







def    _snake_case (       __snake_case    )     ->     int:






      '''simple docstring'''







      return catalan_number(__snake_case    ) * factorial(__snake_case    )


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





def    _snake_case (       __snake_case					,  __snake_case    )     ->     str:






      '''simple docstring'''







      if a < 0 or b < 0:
            raise ValueError("the value of both inputs must be positive"    )

      UpperCAmelCase_  :	List[Any]				      =		str(bin(__snake_case    )    )[2:]  # remove the leading "0b"
      UpperCAmelCase_  :	int				      =		str(bin(__snake_case    )    )[2:]  # remove the leading "0b"

      UpperCAmelCase_  :	Optional[int]				      =		max(len(__snake_case    )					,  len(__snake_case    )    )

      return "0b" + "".join(
          str(int(char_a == "1" and char_b == "1"    )    )
          for char_a, char_b in zip(a_binary.zfill(__snake_case    )					,  b_binary.zfill(__snake_case    )    )    )


if __name__ == "__main__":
   import doctest

   doctest.testmod()
