

import os
def 						UpperCamelCase_(			)       -> int:
 UpperCAmelCase__							=				os.path.dirname(os.path.realpath(snake_case__   )   )
 UpperCAmelCase__							=				os.path.join(snake_case__  ,    'triangle.txt'   )

 with open(snake_case__   ) as in_file:
  UpperCAmelCase__							=				[[int(snake_case__   ) for i in line.split()] for line in in_file]

 while len(snake_case__   ) != 1:
  UpperCAmelCase__							=				triangle.pop()
  UpperCAmelCase__							=				triangle[-1]
  for j in range(len(snake_case__   ) - 1   ):
   curr_row[j] += max(last_row[j]  ,    last_row[j + 1]   )
 return triangle[0][0]


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











def    lowerCAmelCase__		(			_a				:	int			):
		if not isinstance(_a     ,					_a			):
				snake_case_ :							Optional[int]         =				F'''Input value of [number={number}] must be an integer'''
				raise TypeError(_a			)
		if number < 1:
				raise ValueError("Input must be a positive integer"			)
		return number * (2 * number - 1)


if __name__ == "__main__":
							import doctest

							doctest.testmod()
