



import os

def   SCREAMING_SNAKE_CASE_       (  )     ->    Tuple:
   _A						     =					os.path.dirname(os.path.realpath(_snake_case							)							)
   _A						     =					os.path.join(_snake_case  ,      '''triangle.txt'''							)

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

   _A						     =					[[int(_snake_case							) for y in x.rstrip('''\r\n'''							).split(''' '''							)] for x in triangle]

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


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








def   SCREAMING_SNAKE_CASE_       (  _snake_case  :list							)     ->    list:
   if len(_snake_case							) <= 1:
      return data
   else:
      return [
          *quick_sort([e for e in data[1:] if e <= data[0]]							),
          data[0],
          *quick_sort([e for e in data[1:] if e > data[0]]							),
      ]


if __name__ == "__main__":
   import doctest

   doctest.testmod()



