
"""simple docstring"""

import os




def 			lowercase__  (    )       ->					int:






    """simple docstring"""




    UpperCAmelCase  	=    os.path.dirname(os.path.realpath(lowerCAmelCase       )       )
    UpperCAmelCase  	=    os.path.join(lowerCAmelCase       , 'triangle.txt'       )

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

    while len(lowerCAmelCase       ) != 1:
        UpperCAmelCase  	=    triangle.pop()
        UpperCAmelCase  	=    triangle[-1]
        for j in range(len(lowerCAmelCase       ) - 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 is_torch_available, is_transformers_available


if is_transformers_available() and is_torch_available():
   from .image_encoder import PaintByExampleImageEncoder
   from .pipeline_paint_by_example import PaintByExamplePipeline



