





"""simple docstring"""


import os

def     UpperCamelCase       ():
						UpperCamelCase							:		List[Any]							      = os.path.dirname(os.path.realpath(SCREAMING_SNAKE_CASE    )    )
						UpperCamelCase							:		List[Any]							      = os.path.join(SCREAMING_SNAKE_CASE       ,    """triangle.txt"""    )

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

						while len(SCREAMING_SNAKE_CASE    ) != 1:
												UpperCamelCase							:		Dict							      = triangle.pop()
												UpperCamelCase							:		Dict							      = 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"""


def     UpperCamelCase       (SCREAMING_SNAKE_CASE = 1000    ):
						UpperCamelCase							:		List[str]							      = []
						UpperCamelCase							:		int							      = []
						UpperCamelCase							:		Dict							      = 3
						UpperCamelCase							:		Dict							      = 5
						UpperCamelCase							:		Optional[int]							      = 1
						while True:
												UpperCamelCase							:		int							      = z * temp
												if result < n:
																		zmulti.append(SCREAMING_SNAKE_CASE    )
																		temp += 1
												else:
																		UpperCamelCase							:		Optional[int]							      = 1
																		break
						while True:
												UpperCamelCase							:		Any							      = x * temp
												if result < n:
																		xmulti.append(SCREAMING_SNAKE_CASE    )
																		temp += 1
												else:
																		break
						UpperCamelCase							:		List[Any]							      = list(set(xmulti + zmulti    )    )
						return sum(SCREAMING_SNAKE_CASE    )


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



