

import os



def 			_A	(      ):
	UpperCAmelCase__:	Any									= os.path.dirname(os.path.realpath(SCREAMING_SNAKE_CASE      )      )
	UpperCAmelCase__:	List[Any]									= os.path.join(SCREAMING_SNAKE_CASE	,"triangle.txt"      )

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

	UpperCAmelCase__:	Union[str, Any]									= []
	for line in triangle:
		UpperCAmelCase__:	List[Any]									= []
		for number in line.strip().split(" "      ):
			numbers_from_line.append(int(SCREAMING_SNAKE_CASE      )      )
		a.append(SCREAMING_SNAKE_CASE      )

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


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


import unittest

from transformers import DonutProcessor


_lowerCAmelCase  :      str			 ="""naver-clova-ix/donut-base"""

class __UpperCamelCase     (				unittest.TestCase		):






					'''simple docstring'''



					def    _UpperCAmelCase    (				self						):
						UpperCAmelCase__:	Any									= DonutProcessor.from_pretrained(lowerCamelCase__						)





					def    _UpperCAmelCase    (				self						):
						UpperCAmelCase__:	Any									= {
						    "name": "John Doe",
						    "age": "99",
						    "city": "Atlanta",
						    "state": "GA",
						    "zip": "30301",
						    "phone": "123-4567",
						    "nicknames": [{"nickname": "Johnny"}, {"nickname": "JD"}],
						}

						UpperCAmelCase__:	Optional[Any]									= (
						    "<s_name>John Doe</s_name><s_age>99</s_age><s_city>Atlanta</s_city>"
						    "<s_state>GA</s_state><s_zip>30301</s_zip><s_phone>123-4567</s_phone>"
						    "<s_nicknames><s_nickname>Johnny</s_nickname>"
						    "<sep/><s_nickname>JD</s_nickname></s_nicknames>"
						)
						UpperCAmelCase__:	str									= self.processor.tokenajson(lowerCamelCase__						)

						self.assertDictEqual(lowerCamelCase__				,      lowerCamelCase__						)