






'''simple docstring'''







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


_A      :     Dict       	={'''configuration_yoso''': ['''YOSO_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''YosoConfig''']}

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_A      :     str       	=[
			    '''YOSO_PRETRAINED_MODEL_ARCHIVE_LIST''',
			    '''YosoForMaskedLM''',
			    '''YosoForMultipleChoice''',
			    '''YosoForQuestionAnswering''',
			    '''YosoForSequenceClassification''',
			    '''YosoForTokenClassification''',
			    '''YosoLayer''',
			    '''YosoModel''',
			    '''YosoPreTrainedModel''',
			]


if TYPE_CHECKING:
			from .configuration_yoso import YOSO_PRETRAINED_CONFIG_ARCHIVE_MAP, YosoConfig

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_yoso import (
						    YOSO_PRETRAINED_MODEL_ARCHIVE_LIST,
						    YosoForMaskedLM,
						    YosoForMultipleChoice,
						    YosoForQuestionAnswering,
						    YosoForSequenceClassification,
						    YosoForTokenClassification,
						    YosoLayer,
						    YosoModel,
						    YosoPreTrainedModel,
						)


else:
			import sys

			_A      :     List[Any]       	=_LazyModule(__name__, globals()['''__file__'''], _import_structure)




import os







def      snake_case__							(  ):





     """simple docstring"""







     SCREAMING_SNAKE_CASE 		=os.path.dirname(os.path.realpath(lowerCAmelCase_     )     )
     SCREAMING_SNAKE_CASE 		=os.path.join(lowerCAmelCase_,       'triangle.txt'     )

     with open(lowerCAmelCase_     ) as f:
          SCREAMING_SNAKE_CASE 		=f.readlines()

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

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


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

