


"""simple docstring"""



import os
def     UpperCAmelCase    (					)	->   List[str]:


	"""simple docstring"""




	lowerCAmelCase_			       = os.path.dirname(os.path.realpath(_A  )  )
	lowerCAmelCase_			       = os.path.join(_A ,      '''triangle.txt'''  )

	with open(_A  ) as f:
		lowerCAmelCase_			       = f.readlines()

	lowerCAmelCase_			       = [[int(_A  ) for y in x.rstrip('''\r\n'''  ).split(''' '''  )] for x in triangle]

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


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



"""simple docstring"""



lowercase_							 =       [0.485, 0.456, 0.406]
lowercase_							 =       [0.229, 0.224, 0.225]
lowercase_							 =       [0.5, 0.5, 0.5]
lowercase_							 =       [0.5, 0.5, 0.5]
lowercase_							 =       [0.4814_5466, 0.457_8275, 0.4082_1073]
lowercase_							 =       [0.2686_2954, 0.2613_0258, 0.2757_7711]