





"""simple docstring"""


from ...configuration_utils import PretrainedConfig
from ...utils import logging


__magic_name__       :					Optional[Any]						=			logging.get_logger(__name__)

__magic_name__       :					Tuple						=			{
    """google/realm-cc-news-pretrained-embedder""": (
        """https://huggingface.co/google/realm-cc-news-pretrained-embedder/resolve/main/config.json"""
    ),
    """google/realm-cc-news-pretrained-encoder""": (
        """https://huggingface.co/google/realm-cc-news-pretrained-encoder/resolve/main/config.json"""
    ),
    """google/realm-cc-news-pretrained-scorer""": (
        """https://huggingface.co/google/realm-cc-news-pretrained-scorer/resolve/main/config.json"""
    ),
    """google/realm-cc-news-pretrained-openqa""": (
        """https://huggingface.co/google/realm-cc-news-pretrained-openqa/aresolve/main/config.json"""
    ),
    """google/realm-orqa-nq-openqa""": """https://huggingface.co/google/realm-orqa-nq-openqa/resolve/main/config.json""",
    """google/realm-orqa-nq-reader""": """https://huggingface.co/google/realm-orqa-nq-reader/resolve/main/config.json""",
    """google/realm-orqa-wq-openqa""": """https://huggingface.co/google/realm-orqa-wq-openqa/resolve/main/config.json""",
    """google/realm-orqa-wq-reader""": """https://huggingface.co/google/realm-orqa-wq-reader/resolve/main/config.json""",
    # See all REALM models at https://huggingface.co/models?filter=realm
}






class 							lowercase__			(   __SCREAMING_SNAKE_CASE	):

			"""simple docstring"""
			__lowerCAmelCase     :				List[str]										=  """realm"""







			def __init__(      self						,   _A=3_0_5_2_2						,   _A=7_6_8						,   _A=1_2_8						,   _A=1_2						,   _A=1_2						,   _A=8						,   _A=3_0_7_2						,   _A="gelu_new"						,   _A=0.1						,   _A=0.1						,   _A=5_1_2						,   _A=2						,   _A=0.02						,   _A=1e-1_2						,   _A=2_5_6						,   _A=1_0						,   _A=1e-3						,   _A=5						,   _A=3_2_0						,   _A=1_3_3_5_3_7_1_8						,   _A=5_0_0_0						,   _A=1						,   _A=0						,   _A=2						,   **_A						,   ):






									'''simple docstring'''







									super().__init__(pad_token_id=_A						,   bos_token_id=_A						,   eos_token_id=_A						,   **_A    )

									# Common config
									UpperCamelCase				:		Tuple				   =			vocab_size
									UpperCamelCase				:		Any				   =			max_position_embeddings
									UpperCamelCase				:		Optional[Any]				   =			hidden_size
									UpperCamelCase				:		Dict				   =			retriever_proj_size
									UpperCamelCase				:		str				   =			num_hidden_layers
									UpperCamelCase				:		Any				   =			num_attention_heads
									UpperCamelCase				:		Optional[int]				   =			num_candidates
									UpperCamelCase				:		Union[str, Any]				   =			intermediate_size
									UpperCamelCase				:		Any				   =			hidden_act
									UpperCamelCase				:		Tuple				   =			hidden_dropout_prob
									UpperCamelCase				:		Optional[int]				   =			attention_probs_dropout_prob
									UpperCamelCase				:		Optional[Any]				   =			initializer_range
									UpperCamelCase				:		Union[str, Any]				   =			type_vocab_size
									UpperCamelCase				:		Optional[Any]				   =			layer_norm_eps

									# Reader config
									UpperCamelCase				:		Any				   =			span_hidden_size
									UpperCamelCase				:		Dict				   =			max_span_width
									UpperCamelCase				:		List[Any]				   =			reader_layer_norm_eps
									UpperCamelCase				:		int				   =			reader_beam_size
									UpperCamelCase				:		Optional[Any]				   =			reader_seq_len

									# Retrieval config
									UpperCamelCase				:		List[Any]				   =			num_block_records
									UpperCamelCase				:		Union[str, Any]				   =			searcher_beam_size










'''simple docstring'''




def 		__A		(  lowerCamelCase_			,			lowerCamelCase_	):


		"""simple docstring"""



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



def 		__A		(  lowerCamelCase_	):


		"""simple docstring"""



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



def 		__A		(  lowerCamelCase_	):


		"""simple docstring"""



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



def 		__A		(  lowerCamelCase_	):


		"""simple docstring"""



		return catalan_number(lowerCamelCase_	) * factorial(lowerCamelCase_	)


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



