





def    __UpperCAmelCase(      lowercase_ ,    lowercase_      ):
							_lowerCamelCase							:     Union[str, Any]	=		1  # To kept the Calculated Value
							# Since C(n, k) = C(n, n-k)
							if k > (n - k):
														_lowerCamelCase							:     str	=		n - k
							# Calculate C(n,k)
							for i in range(__A      ):
														result *= n - i
														result //= i + 1
							return result




def    __UpperCAmelCase(      lowercase_      ):
							return binomial_coefficient(2 * node_count ,    __A      ) // (node_count + 1)




def    __UpperCAmelCase(      lowercase_      ):
							if n < 0:
														raise ValueError('''factorial() not defined for negative values'''      )
							_lowerCamelCase							:     Union[str, Any]	=		1
							for i in range(1 ,    n + 1      ):
														result *= i
							return result




def    __UpperCAmelCase(      lowercase_      ):
							return catalan_number(__A      ) * factorial(__A      )


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.'''
							)








import unittest

from knapsack import knapsack as k







class 			__A       (      unittest.TestCase  ):




      """simple docstring"""







      def 				__snake_case			(		self):



             """simple docstring"""





             _lowerCamelCase							:     Dict	=		0
             _lowerCamelCase							:     int	=		[0]
             _lowerCamelCase							:     Optional[int]	=		[0]
             _lowerCamelCase							:     Dict	=		len(a__)
             self.assertEqual(k.knapsack(a__      ,							a__      ,							a__      ,							a__)      ,							0)

             _lowerCamelCase							:     str	=		[60]
             _lowerCamelCase							:     List[str]	=		[10]
             _lowerCamelCase							:     List[Any]	=		len(a__)
             self.assertEqual(k.knapsack(a__      ,							a__      ,							a__      ,							a__)      ,							0)


      def 				__snake_case			(		self):



             """simple docstring"""





             _lowerCamelCase							:     Union[str, Any]	=		3
             _lowerCamelCase							:     List[Any]	=		[1, 2, 3]
             _lowerCamelCase							:     Dict	=		[3, 2, 1]
             _lowerCamelCase							:     Any	=		len(a__)
             self.assertEqual(k.knapsack(a__      ,							a__      ,							a__      ,							a__)      ,							5)



      def 				__snake_case			(		self):



             """simple docstring"""





             _lowerCamelCase							:     Optional[Any]	=		50
             _lowerCamelCase							:     Dict	=		[60, 100, 120]
             _lowerCamelCase							:     Dict	=		[10, 20, 30]
             _lowerCamelCase							:     Union[str, Any]	=		len(a__)
             self.assertEqual(k.knapsack(a__      ,							a__      ,							a__      ,							a__)      ,							220)


if __name__ == "__main__":
       unittest.main()

