






'''simple docstring'''







import os






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

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

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


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







'''simple docstring'''







import re






def  lowerCAmelCase__		(					a_  :     Optional[int]			)   -> Optional[Any]:
       def docstring_decorator(a_  :     Dict			):
              UpperCAmelCase__	:   Optional[int]												=	fn.__doc__
              UpperCAmelCase__	:   Dict												=	func_doc.split('''\n'''			)
              UpperCAmelCase__	:   Any												=	0
              while i < len(a_			) and re.search(r'''^\s*Examples?:\s*$'''			,						lines[i]			) is None:
                     i += 1
              if i < len(a_			):
                     UpperCAmelCase__	:   List[Any]												=	example_docstring
                     UpperCAmelCase__	:   int												=	'''\n'''.join(a_			)
              else:
                     raise ValueError(
                         f"""The function {fn} should have an empty 'Examples:' in its docstring as placeholder, """
                         f"""current docstring is:\n{func_doc}"""			)
              UpperCAmelCase__	:   Any												=	func_doc
              return fn

       return docstring_decorator