



"""simple docstring"""






from __future__ import annotations






def 			snake_case_    ( A_   :						list[list[int]]		):


       '''simple docstring'''





       for i in range(1,							len(matrix[0]		)		):
              matrix[0][i] += matrix[0][i - 1]

       # preprocessing the first column
       for i in range(1,							len(A_		)		):
              matrix[i][0] += matrix[i - 1][0]

       # updating the path cost for current position
       for i in range(1,							len(A_		)		):
              for j in range(1,							len(matrix[0]		)		):
                     matrix[i][j] += min(matrix[i - 1][j],							matrix[i][j - 1]		)

       return matrix[-1][-1]


if __name__ == "__main__":
   import doctest

   doctest.testmod()






"""simple docstring"""


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


def    _lowerCamelCase   (     lowerCamelCase__	:							int  ):

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

 lowercase__       :       List[str]				=						precision
 lowercase__       :       Optional[int]				=						ceil(precision / 14  )
 lowercase__       :       Union[str, Any]				=						42_68_80 * Decimal(1_00_05  ).sqrt()
 lowercase__       :       Optional[Any]				=						1
 lowercase__       :       Optional[Any]				=						13_59_14_09
 lowercase__       :       List[Any]				=						Decimal(lowerCamelCase__  )
 for k in range(1       ,		lowerCamelCase__  ):
  lowercase__       :       Optional[int]				=						factorial(6 * k  ) // (factorial(3 * k  ) * factorial(lowerCamelCase__  ) ** 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__":
   __snake_case    					=					50
   print(F"The first {n} digits of pi is: {pi(n)}")