






'''simple docstring'''



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


lowerCamelCase	 =       {
    """configuration_upernet""": ["""UperNetConfig"""],
}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowerCamelCase	 =       [
		    """UperNetForSemanticSegmentation""",
		    """UperNetPreTrainedModel""",
		]


if TYPE_CHECKING:
		from .configuration_upernet import UperNetConfig

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_upernet import UperNetForSemanticSegmentation, UperNetPreTrainedModel


else:
		import sys

		lowerCamelCase	 =       _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)








'''simple docstring'''



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



def   _A       (   _lowerCAmelCase					):



							"""simple docstring"""



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

							__lowercase       	=precision
							__lowercase       	=ceil(precision / 14					)
							__lowercase       	=426_880 * Decimal(10_005					).sqrt()
							__lowercase       	=1
							__lowercase       	=13_591_409
							__lowercase       	=Decimal(_lowerCAmelCase					)
							for k in range(1  ,   _lowerCAmelCase					):
														__lowercase       	=factorial(6 * k					) // (factorial(3 * k					) * factorial(_lowerCAmelCase					) ** 3)
														linear_term += 545_140_134
														exponential_term *= -262_537_412_640_768_000
														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)}")



