


import os






def 						a__			(				):
			SCREAMING_SNAKE_CASE_		:     List[str]					=					os.path.dirname(os.path.realpath(A__				)				)
			SCREAMING_SNAKE_CASE_		:     int					=					os.path.join(A__,      'triangle.txt'				)

			with open(A__				) as f:
						SCREAMING_SNAKE_CASE_		:     Any					=					f.readlines()

			SCREAMING_SNAKE_CASE_		:     Any					=					[]
			for line in triangle:
						SCREAMING_SNAKE_CASE_		:     Optional[Any]					=					[]
						for number in line.strip().split(' '				):
									numbers_from_line.append(int(A__				)				)
						a.append(A__				)

			for i in range(1,      len(A__				)				):
						for j in range(len(a[i]				)				):
									SCREAMING_SNAKE_CASE_		:     Any					=					a[i - 1][j] if j != len(a[i - 1]				) else 0
									SCREAMING_SNAKE_CASE_		:     int					=					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())









from __future__ import annotations






def 						a__			(				A__,      A__ = None,      A__ = None				):
			if start is None:
						SCREAMING_SNAKE_CASE_		:     List[str]					=					0

			if end is None:
						SCREAMING_SNAKE_CASE_		:     Optional[Any]					=					len(A__				) - 1

			if start >= end:
						return

			SCREAMING_SNAKE_CASE_		:     Tuple					=					(start + end) // 2

			slowsort(A__,      A__,      A__				)
			slowsort(A__,      mid + 1,      A__				)

			if sequence[end] < sequence[mid]:
						SCREAMING_SNAKE_CASE_		,      SCREAMING_SNAKE_CASE_		:     Optional[Any]					=					sequence[mid], sequence[end]

			slowsort(A__,      A__,      end - 1				)


if __name__ == "__main__":
				from doctest import testmod

				testmod()





