import os







def 						UpperCAmelCase							(		)						->						Optional[int]:
     a	:     Optional[Any]						      =    os.path.dirname(os.path.realpath(UpperCAmelCase__							)							)
     a	:     str						      =    os.path.join(UpperCAmelCase__    ,   '''triangle.txt'''							)

     with open(UpperCAmelCase__							) as f:
          a	:     Any						      =    f.readlines()

     a	:     Tuple						      =    [[int(UpperCAmelCase__							) for y in x.rstrip('''\r\n'''							).split(''' '''							)] for x in triangle]

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


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







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


try:
						if not (is_transformers_available() and is_torch_available() and is_transformers_version(""">=""", """4.27.0""")):
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						from ...utils.dummy_torch_and_transformers_objects import (
						    AudioLDMPipeline,
						)
else:
						from .pipeline_audioldm import AudioLDMPipeline

