'''simple docstring'''
def  _UpperCamelCase (     _a	:	int				,     _a	:	int			):




    """simple docstring"""



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







def  _UpperCamelCase (     _a	:	int			):




    """simple docstring"""



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







def  _UpperCamelCase (     _a	:	int			):




    """simple docstring"""



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







def  _UpperCamelCase (     _a	:	int			):




    """simple docstring"""



    return catalan_number(_a			) * factorial(_a			)


if __name__ == "__main__":
  a=  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'''
from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


a=  {
    '''configuration_bridgetower''': [
        '''BRIDGETOWER_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''BridgeTowerConfig''',
        '''BridgeTowerTextConfig''',
        '''BridgeTowerVisionConfig''',
    ],
    '''processing_bridgetower''': ['''BridgeTowerProcessor'''],
}

try:
  if not is_vision_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  a=  ['''BridgeTowerImageProcessor''']

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  a=  [
      '''BRIDGETOWER_PRETRAINED_MODEL_ARCHIVE_LIST''',
      '''BridgeTowerForContrastiveLearning''',
      '''BridgeTowerForImageAndTextRetrieval''',
      '''BridgeTowerForMaskedLM''',
      '''BridgeTowerModel''',
      '''BridgeTowerPreTrainedModel''',
  ]


if TYPE_CHECKING:
  from .configuration_bridgetower import (
      BRIDGETOWER_PRETRAINED_CONFIG_ARCHIVE_MAP,
      BridgeTowerConfig,
      BridgeTowerTextConfig,
      BridgeTowerVisionConfig,
  )
  from .processing_bridgetower import BridgeTowerProcessor

  try:
    if not is_vision_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .image_processing_bridgetower import BridgeTowerImageProcessor

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_bridgetower import (
        BRIDGETOWER_PRETRAINED_MODEL_ARCHIVE_LIST,
        BridgeTowerForContrastiveLearning,
        BridgeTowerForImageAndTextRetrieval,
        BridgeTowerForMaskedLM,
        BridgeTowerModel,
        BridgeTowerPreTrainedModel,
    )


else:
  import sys

  a=  _LazyModule(__name__, globals()['''__file__'''], _import_structure)



