



import os

def 			lowerCAmelCase_  (						)							-> Optional[Any]:







			"""simple docstring"""
			a__     :		Tuple		 =						os.path.dirname(os.path.realpath(_lowercase))
			a__     :		Dict		 =						os.path.join(_lowercase		,     """triangle.txt""")

			with open(_lowercase) as f:
						a__     :		Union[str, Any]		 =						f.readlines()

			a__     :		List[str]		 =						[[int(_lowercase) for y in x.rstrip("""\r\n""").split(""" """)] for x in triangle]

			for i in range(1		,     len(_lowercase)):
						for j in range(len(a[i])):
									a__     :		Any		 =						a[i - 1][j] if j != len(a[i - 1]) else 0
									a__     :		List[Any]		 =						a[i - 1][j - 1] if j > 0 else 0
									a[i][j] += max(_lowercase		,     _lowercase)
			return max(a[-1])


if __name__ == "__main__":
		print(solution())









import decimal

def 			lowerCAmelCase_  (						)							-> int:







			"""simple docstring"""
			a__     :		Optional[Any]		 =						0
			a__     :		Optional[int]		 =						decimal.Context(prec=105)
			for i in range(2		,     100):
						a__     :		int		 =						decimal.Decimal(_lowercase)
						a__     :		Optional[int]		 =						number.sqrt(_lowercase)
						if len(str(_lowercase)) > 1:
									answer += int(str(_lowercase)[0])
									a__     :		Tuple		 =						str(_lowercase)[2:101]
									answer += sum(int(_lowercase) for x in sqrt_number_str)
			return answer


if __name__ == "__main__":
		import doctest

		doctest.testmod()
		print(f'{solution() = }')




