






import os
def    a__    (	):
   lowercase__    :						Dict       =			os.path.dirname(os.path.realpath(A       )       )
   lowercase__    :						Optional[Any]       =			os.path.join(A		,					"""triangle.txt"""       )

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

   while len(A       ) != 1:
      lowercase__    :						List[str]       =			triangle.pop()
      lowercase__    :						str       =			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())









import math
from decimal import Decimal, getcontext


def      SCREAMING_SNAKE_CASE      (   lowerCAmelCase = 4_000_000       ):

       try:
              _UpperCamelCase														=    int(lowerCAmelCase       )
       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.'''       )
       _UpperCamelCase														=    100
       _UpperCamelCase														=    (Decimal(5       ) ** Decimal(0.5       ) + 1) / Decimal(2       )

       _UpperCamelCase														=    (math.floor(math.log(n * (phi + 2)     ,							lowerCAmelCase       ) - 1       ) // 3) * 3 + 2
       _UpperCamelCase														=    Decimal(round(phi ** Decimal(index + 1       )       )       ) / (phi + 2)
       _UpperCamelCase														=    num // 2
       return int(lowerCAmelCase       )


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






