






'''simple docstring'''


import os







def 						__magic_name__(			):
						'''simple docstring'''





						UpperCamelCase__       =			os.path.dirname(os.path.realpath(_A       )       )
						UpperCamelCase__       =			os.path.join(_A    ,   """triangle.txt"""       )

						with open(_A       ) as in_file:
												UpperCamelCase__       =			[[int(_A       ) for i in line.split()] for line in in_file]

						while len(_A       ) != 1:
												UpperCamelCase__       =			triangle.pop()
												UpperCamelCase__       =			triangle[-1]
												for j in range(len(_A       ) - 1       ):
																		curr_row[j] += max(last_row[j]    ,   last_row[j + 1]       )
						return triangle[0][0]


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








'''simple docstring'''


from dataclasses import dataclass
from typing import List, Optional, Union

import numpy as np
import PIL
from PIL import Image

from ...utils import BaseOutput, is_torch_available, is_transformers_available
@dataclass
# Copied from diffusers.pipelines.stable_diffusion.__init__.StableDiffusionPipelineOutput with Stable->Alt
class  _SCREAMING_SNAKE_CASE				(		SCREAMING_SNAKE_CASE						):


			'''simple docstring'''





			__a				:				Union[List[PIL.Image.Image], np.ndarray]
			__a				:				Optional[List[bool]]


if is_transformers_available() and is_torch_available():
					from .modeling_roberta_series import RobertaSeriesModelWithTransformation
					from .pipeline_alt_diffusion import AltDiffusionPipeline
					from .pipeline_alt_diffusion_imgaimg import AltDiffusionImgaImgPipeline
