

'''simple docstring'''
import os
import sys
from contextlib import contextmanager


# Windows only
if os.name == "nt":
     import ctypes
     import msvcrt  # noqa







     class 							A__    (       ctypes.Structure  ):
       # _fields is a specific attr expected by ctypes
       A__		 =				[('size', ctypes.c_int), ('visible', ctypes.c_byte)]


def        _lowerCAmelCase					(						)      ->			Optional[Any]:
     """simple docstring"""




     if os.name == "nt":
          _SCREAMING_SNAKE_CASE							    =CursorInfo()
          _SCREAMING_SNAKE_CASE							    =ctypes.windll.kernelaa.GetStdHandle(-11				)
          ctypes.windll.kernelaa.GetConsoleCursorInfo(_UpperCamelCase							, ctypes.byref(_UpperCamelCase				)				)
          _SCREAMING_SNAKE_CASE							    =False
          ctypes.windll.kernelaa.SetConsoleCursorInfo(_UpperCamelCase							, ctypes.byref(_UpperCamelCase				)				)
     elif os.name == "posix":
          sys.stdout.write('\033[?25l'				)
          sys.stdout.flush()


def        _lowerCAmelCase					(						)      ->			List[str]:
     """simple docstring"""




     if os.name == "nt":
          _SCREAMING_SNAKE_CASE							    =CursorInfo()
          _SCREAMING_SNAKE_CASE							    =ctypes.windll.kernelaa.GetStdHandle(-11				)
          ctypes.windll.kernelaa.GetConsoleCursorInfo(_UpperCamelCase							, ctypes.byref(_UpperCamelCase				)				)
          _SCREAMING_SNAKE_CASE							    =True
          ctypes.windll.kernelaa.SetConsoleCursorInfo(_UpperCamelCase							, ctypes.byref(_UpperCamelCase				)				)
     elif os.name == "posix":
          sys.stdout.write('\033[?25h'				)
          sys.stdout.flush()







@contextmanager
def        _lowerCAmelCase					(						)      ->			Optional[int]:
     """simple docstring"""




     try:
          hide_cursor()
          yield
     finally:
          show_cursor()








"""simple docstring"""





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







def      lowerCamelCase__       (							_lowerCamelCase       :		int )      ->				int:
  return binomial_coefficient(2 * node_count		,				_lowerCamelCase ) // (node_count + 1)







def      lowerCamelCase__       (							_lowerCamelCase       :		int )      ->				int:
  if n < 0:
    raise ValueError('factorial() not defined for negative values' )
  lowerCamelCase_         =						1
  for i in range(1		,				n + 1 ):
    result *= i
  return result







def      lowerCamelCase__       (							_lowerCamelCase       :		int )      ->				int:
  return catalan_number(_lowerCamelCase ) * factorial(_lowerCamelCase )


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




