



"""simple docstring"""





def 	__lowerCAmelCase						(		__UpperCamelCase      :			bytes    ):


						'''simple docstring'''






						return "".join([hex(__UpperCamelCase    )[2:].zfill(2    ).upper() for byte in list(__UpperCamelCase    )]    )
def 	__lowerCAmelCase						(		__UpperCamelCase      :			str    ):


						'''simple docstring'''






						if (len(__UpperCamelCase    ) % 2) != 0:
												raise ValueError(
												    """Base16 encoded data is invalid:
Data does not have an even number of hex digits."""    )
						# Check the character set - the standard base16 alphabet
						# is uppercase according to RFC3548 section 6
						if not set(__UpperCamelCase    ) <= set("""0123456789ABCDEF"""    ):
												raise ValueError(
												    """Base16 encoded data is invalid:
Data is not uppercase hex or it contains invalid characters."""    )
						# For every two hexadecimal digits (= a byte), turn it into an integer.
						# Then, string the result together into bytes, and return it.
						return bytes(int(data[i] + data[i + 1]					, 1_6    ) for i in range(0					, len(__UpperCamelCase    )					, 2    )    )


if __name__ == "__main__":
					import doctest

					doctest.testmod()






"""simple docstring"""





def 	__lowerCAmelCase						(		__UpperCamelCase      :			int					, __UpperCamelCase      :			int    ):


						'''simple docstring'''






						snake_case_   : Any						=			1  # To kept the Calculated Value
						# Since C(n, k) = C(n, n-k)
						if k > (n - k):
												snake_case_   : Optional[int]						=			n - k
						# Calculate C(n,k)
						for i in range(__UpperCamelCase    ):
												result *= n - i
												result //= i + 1
						return result
def 	__lowerCAmelCase						(		__UpperCamelCase      :			int    ):


						'''simple docstring'''






						return binomial_coefficient(2 * node_count					, __UpperCamelCase    ) // (node_count + 1)
def 	__lowerCAmelCase						(		__UpperCamelCase      :			int    ):


						'''simple docstring'''






						if n < 0:
												raise ValueError("""factorial() not defined for negative values"""    )
						snake_case_   : Optional[int]						=			1
						for i in range(1					, n + 1    ):
												result *= i
						return result
def 	__lowerCAmelCase						(		__UpperCamelCase      :			int    ):


						'''simple docstring'''






						return catalan_number(__UpperCamelCase    ) * factorial(__UpperCamelCase    )


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

