
import os
def 					lowerCAmelCase__     (    )							->						Tuple:
			lowerCAmelCase__ : int   =						os.path.dirname(os.path.realpath(SCREAMING_SNAKE_CASE_	)	)
			lowerCAmelCase__ : Any   =						os.path.join(SCREAMING_SNAKE_CASE_			,				'triangle.txt'	)

			with open(SCREAMING_SNAKE_CASE_	) as f:
						lowerCAmelCase__ : List[Any]   =						f.readlines()

			lowerCAmelCase__ : Union[str, Any]   =						[[int(SCREAMING_SNAKE_CASE_	) for y in x.rstrip('\r\n'	).split(' '	)] for x in triangle]

			for i in range(1			,				len(SCREAMING_SNAKE_CASE_	)	):
						for j in range(len(a[i]	)	):
									lowerCAmelCase__ : Optional[int]   =						a[i - 1][j] if j != len(a[i - 1]	) else 0
									lowerCAmelCase__ : Optional[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 math
from decimal import Decimal, getcontext
def 					lowerCAmelCase__     (    SCREAMING_SNAKE_CASE_ = 4_000_000	)							->						int:

			try:
						lowerCAmelCase__ : str   =						int(SCREAMING_SNAKE_CASE_	)
			except (TypeError, ValueError):
						raise TypeError('Parameter n must be int or castable to int.'	)
			if n <= 0:
						raise ValueError('Parameter n must be greater than or equal to one.'	)
			lowerCAmelCase__ : Union[str, Any]   =						100
			lowerCAmelCase__ : List[Any]   =						(Decimal(5	) ** Decimal(0.5	) + 1) / Decimal(2	)

			lowerCAmelCase__ : Tuple   =						(math.floor(math.log(n * (phi + 2)			,				SCREAMING_SNAKE_CASE_	) - 1	) // 3) * 3 + 2
			lowerCAmelCase__ : Optional[int]   =						Decimal(round(phi ** Decimal(index + 1	)	)	) / (phi + 2)
			lowerCAmelCase__ : Tuple   =						num // 2
			return int(SCREAMING_SNAKE_CASE_	)


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