





def        SCREAMING_SNAKE_CASE      (       _UpperCAmelCase						,	_UpperCAmelCase )			->     int:
    lowerCamelCase__    :      Union[str, Any]					 =		1  # To kept the Calculated Value
    # Since C(n, k) = C(n, n-k)
    if k > (n - k):
        lowerCamelCase__    :      List[Any]					 =		n - k
    # Calculate C(n,k)
    for i in range(_UpperCAmelCase ):
        result *= n - i
        result //= i + 1
    return result


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


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


def        SCREAMING_SNAKE_CASE      (       _UpperCAmelCase )			->     int:
    return catalan_number(_UpperCAmelCase ) * factorial(_UpperCAmelCase )


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












from itertools import count


def        SCREAMING_SNAKE_CASE      (       _UpperCAmelCase = 50 )			->     int:
    lowerCamelCase__    :      Optional[Any]					 =		[1] * min_block_length

    for n in count(_UpperCAmelCase ):
        fill_count_functions.append(1 )

        for block_length in range(_UpperCAmelCase						,	n + 1 ):
            for block_start in range(n - block_length ):
                fill_count_functions[n] += fill_count_functions[
                    n - block_start - block_length - 1
                ]

            fill_count_functions[n] += 1

        if fill_count_functions[n] > 100_0000:
            break

    return n


if __name__ == "__main__":
    print(F"""{solution() = }""")





