


def 		snake_case_   (				lowercase__     :    str     ):






				'''simple docstring'''






				_lowerCAmelCase  						=[]
				_lowerCAmelCase  						=1

				for i in range(len(a__     )     ):
								if i + 1 < len(a__     ) and text[i] == text[i + 1]:
												count += 1
								else:
												encoded.append((text[i], count)     )
												_lowerCAmelCase  						=1

				return encoded

def 		snake_case_   (				lowercase__     :    list     ):






				'''simple docstring'''






				return "".join(char * length for char, length in encoded     )


if __name__ == "__main__":
		from doctest import testmod

		testmod(name='''run_length_encode''', verbose=True)
		testmod(name='''run_length_decode''', verbose=True)




"""simple docstring"""

import os





def 					__UpperCamelCase (     )					->      int:




					"""simple docstring"""



					__lowercase        =      os.path.dirname(os.path.realpath(a__      )      )
					__lowercase        =      os.path.join(a__			,						'''triangle.txt'''      )

					with open(a__      ) as f:
										__lowercase        =      f.readlines()

					__lowercase        =      [[int(a__      ) for y in x.rstrip('''\r\n'''      ).split(''' '''      )] for x in triangle]

					for i in range(1			,						len(a__      )      ):
										for j in range(len(a[i]      )      ):
															__lowercase        =      a[i - 1][j] if j != len(a[i - 1]      ) else 0
															__lowercase        =      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())


