


"""simple docstring"""






from decimal import Decimal, getcontext
from math import ceil, factorial
def      lowerCamelCase       (     _UpperCamelCase		:      int							)		->       str:

							'''simple docstring'''



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

							__UpperCAmelCase   :						List[str]      							=					precision
							__UpperCAmelCase   :						Tuple      							=					ceil(precision / 1_4							)
							__UpperCAmelCase   :						Tuple      							=					4_2_6_8_8_0 * Decimal(1_0_0_0_5							).sqrt()
							__UpperCAmelCase   :						Any      							=					1
							__UpperCAmelCase   :						List[str]      							=					1_3_5_9_1_4_0_9
							__UpperCAmelCase   :						int      							=					Decimal(_UpperCamelCase							)
							for k in range(1       ,			_UpperCamelCase							):
														__UpperCAmelCase   :						List[Any]      							=					factorial(6 * k							) // (factorial(3 * k							) * factorial(_UpperCamelCase							) ** 3)
														linear_term += 5_4_5_1_4_0_1_3_4
														exponential_term *= -2_6_2_5_3_7_4_1_2_6_4_0_7_6_8_0_0_0
														partial_sum += Decimal(multinomial_term * linear_term							) / exponential_term
							return str(constant_term / partial_sum							)[:-1]


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




"""simple docstring"""






def      lowerCamelCase       (     _UpperCamelCase		:      int = 4_0_0_0_0_0_0							)		->       int:

							'''simple docstring'''



							__UpperCAmelCase   :						int      							=					[0, 1]
							__UpperCAmelCase   :						Optional[Any]      							=					0
							while fib[i] <= n:
														fib.append(fib[i] + fib[i + 1]							)
														if fib[i + 2] > n:
																					break
														i += 1
							__UpperCAmelCase   :						str      							=					0
							for j in range(len(_UpperCamelCase							) - 1							):
														if fib[j] % 2 == 0:
																					total += fib[j]

							return total


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