




'''simple docstring'''




import math
from timeit import timeit




def     snake_case__     (			lowerCamelCase__					: int      ) -> int:
					A_			:  Any			=				0
					A_			:  Union[str, Any]			=				abs(lowerCamelCase__      )
					while True:
										A_			:  List[Any]			=				n // 1_0
										digits += 1
										if n == 0:
															break
					return digits




def     snake_case__     (			lowerCamelCase__					: int      ) -> int:
					return 1 if n == 0 else math.floor(math.log(abs(lowerCamelCase__      )      ,		1_0      ) + 1      )




def     snake_case__     (			lowerCamelCase__					: int      ) -> int:
					return len(str(abs(lowerCamelCase__      )      )      )




def     snake_case__     (			) -> None:
					from collections.abc import Callable

					def benchmark_a_function(lowerCamelCase__					: Callable      ,		lowerCamelCase__					: int      ) -> None:
										A_			:  List[str]			=				f'{func.__name__}({value})'
										A_			:  List[Any]			=				timeit(f'__main__.{call}'      ,		setup='''import __main__'''      )
										print(f'{call}: {func(lowerCamelCase__      )} -- {timing} seconds'      )

					for value in (2_6_2_1_4_4, 1_1_2_5_8_9_9_9_0_6_8_4_2_6_2_4, 1_2_6_7_6_5_0_6_0_0_2_2_8_2_2_9_4_0_1_4_9_6_7_0_3_2_0_5_3_7_6):
										for func in (num_digits, num_digits_fast, num_digits_faster):
															benchmark_a_function(lowerCamelCase__      ,		lowerCamelCase__      )
										print()


if __name__ == "__main__":
							import doctest

							doctest.testmod()
							benchmark()









'''simple docstring'''




import os




def     snake_case__     (			) -> int:
					A_			:  List[str]			=				os.path.dirname(os.path.realpath(lowerCamelCase__      )      )
					A_			:  str			=				os.path.join(lowerCamelCase__      ,		'''triangle.txt'''      )

					with open(lowerCamelCase__      ) as in_file:
										A_			:  List[str]			=				[[int(lowerCamelCase__      ) for i in line.split()] for line in in_file]

					while len(lowerCamelCase__      ) != 1:
										A_			:  List[str]			=				triangle.pop()
										A_			:  Optional[Any]			=				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())



