

import os



def 				snake_case_()							->     Optional[int]:



  """simple docstring"""






  _snake_case						=							os.path.dirname(os.path.realpath(_UpperCamelCase					)					)
  _snake_case						=							os.path.join(_UpperCamelCase			,	'''triangle.txt'''					)

  with open(_UpperCamelCase					) as f:
    _snake_case						=							f.readlines()

  _snake_case						=							[]
  for line in triangle:
    _snake_case						=							[]
    for number in line.strip().split(''' '''					):
      numbers_from_line.append(int(_UpperCamelCase					)					)
    a.append(_UpperCamelCase					)

  for i in range(1			,	len(_UpperCamelCase					)					):
    for j in range(len(a[i]					)					):
      _snake_case						=							a[i - 1][j] if j != len(a[i - 1]					) else 0
      _snake_case						=							a[i - 1][j - 1] if j > 0 else 0
      a[i][j] += max(_UpperCamelCase			,	_UpperCamelCase					)
  return max(a[-1]					)


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




import os
import sys
from contextlib import contextmanager


# Windows only
if os.name == "nt":
 import ctypes
 import msvcrt  # noqa



 class   lowercase_   (  ctypes.Structure					):
       # _fields is a specific attr expected by ctypes
       UpperCamelCase_      :		List[Any]										=    [("size", ctypes.c_int), ("visible", ctypes.c_byte)]



def 				snake_case_()							->     int:



  """simple docstring"""






  if os.name == "nt":
    _snake_case						=							CursorInfo()
    _snake_case						=							ctypes.windll.kernelaa.GetStdHandle(-11					)
    ctypes.windll.kernelaa.GetConsoleCursorInfo(_UpperCamelCase			,	ctypes.byref(_UpperCamelCase					)					)
    _snake_case						=							False
    ctypes.windll.kernelaa.SetConsoleCursorInfo(_UpperCamelCase			,	ctypes.byref(_UpperCamelCase					)					)
  elif os.name == "posix":
    sys.stdout.write('''\033[?25l'''					)
    sys.stdout.flush()



def 				snake_case_()							->     Optional[Any]:



  """simple docstring"""






  if os.name == "nt":
    _snake_case						=							CursorInfo()
    _snake_case						=							ctypes.windll.kernelaa.GetStdHandle(-11					)
    ctypes.windll.kernelaa.GetConsoleCursorInfo(_UpperCamelCase			,	ctypes.byref(_UpperCamelCase					)					)
    _snake_case						=							True
    ctypes.windll.kernelaa.SetConsoleCursorInfo(_UpperCamelCase			,	ctypes.byref(_UpperCamelCase					)					)
  elif os.name == "posix":
    sys.stdout.write('''\033[?25h'''					)
    sys.stdout.flush()



@contextmanager
def 				snake_case_()							->     int:



  """simple docstring"""






  try:
    hide_cursor()
    yield
  finally:
    show_cursor()

