





from decimal import Decimal, getcontext
from math import ceil, factorial


def        SCREAMING_SNAKE_CASE      (       _UpperCAmelCase )			->     str:

    if not isinstance(_UpperCAmelCase						,	_UpperCAmelCase ):
        raise TypeError('Undefined for non-integers' )
    elif precision < 1:
        raise ValueError('Undefined for non-natural numbers' )

    lowerCamelCase__    :      Tuple					 =		precision
    lowerCamelCase__    :      Optional[int]					 =		ceil(precision / 14 )
    lowerCamelCase__    :      Optional[Any]					 =		42_6880 * Decimal(1_0005 ).sqrt()
    lowerCamelCase__    :      int					 =		1
    lowerCamelCase__    :      List[str]					 =		1359_1409
    lowerCamelCase__    :      Union[str, Any]					 =		Decimal(_UpperCAmelCase )
    for k in range(1						,	_UpperCAmelCase ):
        lowerCamelCase__    :      int					 =		factorial(6 * k ) // (factorial(3 * k ) * factorial(_UpperCAmelCase ) ** 3)
        linear_term += 5_4514_0134
        exponential_term *= -26_2537_4126_4076_8000
        partial_sum += Decimal(multinomial_term * linear_term ) / exponential_term
    return str(constant_term / partial_sum )[:-1]


if __name__ == "__main__":
    _UpperCAmelCase				:       List[str]	   =				50
    print(F"""The first {n} digits of pi is: {pi(n)}""")












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() = }""")





