



import os







def    _snake_case (       )     ->     Tuple:






      '''simple docstring'''







      UpperCAmelCase_  :	Union[str, Any]				      =		os.path.dirname(os.path.realpath(__snake_case    )    )
      UpperCAmelCase_  :	Optional[Any]				      =		os.path.join(__snake_case					,  "triangle.txt"    )

      with open(__snake_case    ) as f:
            UpperCAmelCase_  :	Optional[Any]				      =		f.readlines()

      UpperCAmelCase_  :	Tuple				      =		[]
      for line in triangle:
            UpperCAmelCase_  :	str				      =		[]
            for number in line.strip().split(" "    ):
                  numbers_from_line.append(int(__snake_case    )    )
            a.append(__snake_case    )

      for i in range(1					,  len(__snake_case    )    ):
            for j in range(len(a[i]    )    ):
                  UpperCAmelCase_  :	Tuple				      =		a[i - 1][j] if j != len(a[i - 1]    ) else 0
                  UpperCAmelCase_  :	List[str]				      =		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())





from abc import ABC, abstractmethod
from typing import Optional, Union

from .. import Dataset, DatasetDict, Features, IterableDataset, IterableDatasetDict, NamedSplit
from ..utils.typing import NestedDataStructureLike, PathLike


class   snake_case_ (lowercase__  ):




       """simple docstring"""






       def __init__(     self     ,lowercase = None     ,lowercase = None     ,lowercase = None     ,lowercase = None     ,lowercase = False     ,lowercase = False     ,lowercase = None     ,**lowercase     ,):

             """simple docstring"""





             UpperCAmelCase_  :	Optional[Any]				      =		path_or_paths
             UpperCAmelCase_  :	Optional[int]				      =		split if split or isinstance(lowercase     ,lowercase) else "train"
             UpperCAmelCase_  :	Optional[int]				      =		features
             UpperCAmelCase_  :	Dict				      =		cache_dir
             UpperCAmelCase_  :	int				      =		keep_in_memory
             UpperCAmelCase_  :	Tuple				      =		streaming
             UpperCAmelCase_  :	Union[str, Any]				      =		num_proc
             UpperCAmelCase_  :	Union[str, Any]				      =		kwargs



       @abstractmethod
       def  A_   (     self):

             """simple docstring"""





             pass


class   snake_case_ (lowercase__  ):




       """simple docstring"""






       def __init__(     self     ,lowercase = None     ,lowercase = None     ,lowercase = False     ,lowercase = False     ,lowercase = None     ,**lowercase     ,):

             """simple docstring"""





             UpperCAmelCase_  :	List[Any]				      =		features
             UpperCAmelCase_  :	List[Any]				      =		cache_dir
             UpperCAmelCase_  :	List[str]				      =		keep_in_memory
             UpperCAmelCase_  :	Optional[int]				      =		streaming
             UpperCAmelCase_  :	Dict				      =		num_proc
             UpperCAmelCase_  :	str				      =		kwargs



       @abstractmethod
       def  A_   (     self):

             """simple docstring"""





             pass
