




import os

def 					_UpperCamelCase    (			)			->			Optional[Any]:


			"""simple docstring"""
			__UpperCAmelCase	: Any		=					os.path.dirname(os.path.realpath(UpperCamelCase__							)							)
			__UpperCAmelCase	: Tuple		=					os.path.join(UpperCamelCase__				,       "triangle.txt"							)

			with open(UpperCamelCase__							) as f:
						__UpperCAmelCase	: Dict		=					f.readlines()

			__UpperCAmelCase	: str		=					[]
			for line in triangle:
						__UpperCAmelCase	: List[str]		=					[]
						for number in line.strip().split(" "							):
									numbers_from_line.append(int(UpperCamelCase__							)							)
						a.append(UpperCamelCase__							)

			for i in range(1				,       len(UpperCamelCase__							)							):
						for j in range(len(a[i]							)							):
									__UpperCAmelCase	: int		=					a[i - 1][j] if j != len(a[i - 1]							) else 0
									__UpperCAmelCase	: Any		=					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"""





def 					_UpperCamelCase    (			UpperCamelCase				,       UpperCamelCase				,       UpperCamelCase							)			->			int:


			"""simple docstring"""

			if exponent == 1:
						return base
			if exponent % 2 == 0:
						__UpperCAmelCase	: Union[str, Any]		=					_modexpt(UpperCamelCase				,       exponent // 2				,       UpperCamelCase							) % modulo_value
						return (x * x) % modulo_value
			else:
						return (base * _modexpt(UpperCamelCase				,       exponent - 1				,       UpperCamelCase							)) % modulo_value

def 					_UpperCamelCase    (			UpperCamelCase = 1777				,       UpperCamelCase = 1855				,       UpperCamelCase = 8							)			->			int:


			"""simple docstring"""
			__UpperCAmelCase	: Optional[int]		=					base
			for _ in range(1				,       UpperCamelCase							):
						__UpperCAmelCase	: str		=					_modexpt(UpperCamelCase				,       UpperCamelCase				,       10**digits							)

			return result


if __name__ == "__main__":
					print(f'''{solution() = }''')


