






'''simple docstring'''







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





def 		_UpperCAmelCase   (							__A							:   int      ):

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

				a_		:  Optional[int]											=      precision
				a_		:  Any											=      ceil(precision / 14      )
				a_		:  Optional[Any]											=      42_68_80 * Decimal(1_00_05      ).sqrt()
				a_		:  List[str]											=      1
				a_		:  Optional[Any]											=      13_59_14_09
				a_		:  Any											=      Decimal(__A      )
				for k in range(1						,		__A      ):
								a_		:  Optional[Any]											=      factorial(6 * k      ) // (factorial(3 * k      ) * factorial(__A      ) ** 3)
								linear_term += 5_45_14_01_34
								exponential_term *= -26_25_37_41_26_40_76_80_00
								partial_sum += Decimal(multinomial_term * linear_term      ) / exponential_term
				return str(constant_term / partial_sum      )[:-1]


if __name__ == "__main__":
		__lowerCAmelCase       		=      50
		print(F"""The first {n} digits of pi is: {pi(n)}""")












'''simple docstring'''







import warnings


warnings.warn(
    'memory_utils has been reorganized to utils.memory. Import `find_executable_batchsize` from the main `__init__`: '
    '`from accelerate import find_executable_batch_size` to avoid this warning.',
    FutureWarning,
)




