


import os
def 							UpperCamelCase_(					)->		str:
			UpperCamelCase__       =							os.path.dirname(os.path.realpath(_A	)	)
			UpperCamelCase__       =							os.path.join(_A					,  "triangle.txt"	)

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

			UpperCamelCase__       =							[]
			for line in triangle:
						UpperCamelCase__       =							[]
						for number in line.strip().split(" "	):
									numbers_from_line.append(int(_A	)	)
						a.append(_A	)

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


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






from ...utils import (
    OptionalDependencyNotAvailable,
    is_torch_available,
    is_transformers_available,
    is_transformers_version,
)


try:
						if not (is_transformers_available() and is_torch_available()):
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						from ...utils.dummy_torch_and_transformers_objects import KandinskyPipeline, KandinskyPriorPipeline
else:
						from .pipeline_kandinsky import KandinskyPipeline
						from .pipeline_kandinsky_imgaimg import KandinskyImgaImgPipeline
						from .pipeline_kandinsky_inpaint import KandinskyInpaintPipeline
						from .pipeline_kandinsky_prior import KandinskyPriorPipeline, KandinskyPriorPipelineOutput
						from .text_encoder import MultilingualCLIP


