import os


def 					__lowerCAmelCase			(  ):



							"""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())



import math
from timeit import timeit


def 					__lowerCAmelCase			(  _A					):



							"""simple docstring"""


							_lowercase				=	0
							_lowercase				=	abs(_A					)
							while True:
														_lowercase				=	n // 10
														digits += 1
														if n == 0:
																					break
							return digits


def 					__lowerCAmelCase			(  _A					):



							"""simple docstring"""


							return 1 if n == 0 else math.floor(math.log(abs(_A					) ,10					) + 1					)


def 					__lowerCAmelCase			(  _A					):



							"""simple docstring"""


							return len(str(abs(_A					)					)					)


def 					__lowerCAmelCase			(  ):



							"""simple docstring"""


							from collections.abc import Callable

							def benchmark_a_function(_A ,_A					) -> None:
														_lowercase				=	f'''{func.__name__}({value})'''
														_lowercase				=	timeit(f'''__main__.{call}''' ,setup="""import __main__"""					)
														print(f'''{call}: {func(_A					)} -- {timing} seconds'''					)

							for value in (262_144, 1_125_899_906_842_624, 1_267_650_600_228_229_401_496_703_205_376):
														for func in (num_digits, num_digits_fast, num_digits_faster):
																					benchmark_a_function(_A ,_A					)
														print()


if __name__ == "__main__":
				import doctest

				doctest.testmod()
				benchmark()


