


import os






def 							__lowercase     (				):
							a__    =  os.path.dirname(os.path.realpath(__lowerCAmelCase     )     )
							a__    =  os.path.join(__lowerCAmelCase      ,					'triangle.txt'     )

							with open(__lowerCAmelCase     ) as f:
														a__    =  f.readlines()

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

							for i in range(1      ,					len(__lowerCAmelCase     )     ):
														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(__lowerCAmelCase      ,					__lowerCAmelCase     )
							return max(a[-1]     )


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




from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


snake_case							: Optional[Any]      =   {'''configuration_focalnet''': ['''FOCALNET_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''FocalNetConfig''']}


try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						snake_case							: Optional[int]      =   [
						    '''FOCALNET_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''FocalNetForImageClassification''',
						    '''FocalNetForMaskedImageModeling''',
						    '''FocalNetBackbone''',
						    '''FocalNetModel''',
						    '''FocalNetPreTrainedModel''',
						]

if TYPE_CHECKING:
						from .configuration_focalnet import FOCALNET_PRETRAINED_CONFIG_ARCHIVE_MAP, FocalNetConfig

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_focalnet import (
												    FOCALNET_PRETRAINED_MODEL_ARCHIVE_LIST,
												    FocalNetBackbone,
												    FocalNetForImageClassification,
												    FocalNetForMaskedImageModeling,
												    FocalNetModel,
												    FocalNetPreTrainedModel,
												)

else:
						import sys

						snake_case							: Union[str, Any]      =   _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)




