"""simple docstring"""




from ...configuration_utils import PretrainedConfig
from ...utils import logging


__lowerCAmelCase    :							int													=						logging.get_logger(__name__)

class       a_      (     __UpperCamelCase			):
					UpperCamelCase_ :	Optional[Any]			=    "timm_backbone"




					def __init__(	self						:     Optional[int]  ,						snake_case__						:     int=None  ,						snake_case__						:     List[str]=3  ,						snake_case__						:     str=True  ,						snake_case__						:     Dict=True  ,						snake_case__						:     List[str]=None  ,						**snake_case__						:     Optional[Any]  ,						):
							super().__init__(**snake_case__     )
							lowerCAmelCase__        =   backbone
							lowerCAmelCase__        =   num_channels
							lowerCAmelCase__        =   features_only
							lowerCAmelCase__        =   use_pretrained_backbone
							lowerCAmelCase__        =   True
							lowerCAmelCase__        =   out_indices if out_indices is not None else (-1,)





"""simple docstring"""




import os







def 							_UpperCAmelCase		(       ):





		"""simple docstring"""




		lowerCAmelCase__        =   os.path.dirname(os.path.realpath(lowerCamelCase__     )     )
		lowerCAmelCase__        =   os.path.join(lowerCamelCase__			,  """triangle.txt"""     )

		with open(lowerCamelCase__     ) as f:
				lowerCAmelCase__        =   f.readlines()

		lowerCAmelCase__        =   []
		for line in triangle:
				lowerCAmelCase__        =   []
				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]     )     ):
						lowerCAmelCase__        =   a[i - 1][j] if j != len(a[i - 1]     ) else 0
						lowerCAmelCase__        =   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())




