

'''simple docstring'''




import os


def  lowerCamelCase__						(  ):
  UpperCAmelCase  							=		os.path.dirname(os.path.realpath(SCREAMING_SNAKE_CASE  )  )
  UpperCAmelCase  							=		os.path.join(SCREAMING_SNAKE_CASE    ,				'triangle.txt'  )

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

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


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





'''simple docstring'''




from typing import TypeVar

from .arrow_dataset import Dataset, _split_by_node_map_style_dataset
from .iterable_dataset import IterableDataset, _split_by_node_iterable_dataset


_a			:	Optional[int]								=  TypeVar('DatasetType', Dataset, IterableDataset)


def  lowerCamelCase__						(  SCREAMING_SNAKE_CASE :				DatasetType    ,				SCREAMING_SNAKE_CASE :				int    ,				SCREAMING_SNAKE_CASE :				int  ):
  if isinstance(SCREAMING_SNAKE_CASE    ,				SCREAMING_SNAKE_CASE  ):
    return _split_by_node_map_style_dataset(SCREAMING_SNAKE_CASE    ,				rank=SCREAMING_SNAKE_CASE    ,				world_size=SCREAMING_SNAKE_CASE  )
  else:
    return _split_by_node_iterable_dataset(SCREAMING_SNAKE_CASE    ,				rank=SCREAMING_SNAKE_CASE    ,				world_size=SCREAMING_SNAKE_CASE  )


