





"""simple docstring"""
import os






def  A__    (      ):
							A		=  os.path.dirname(os.path.realpath(UpperCamelCase	)	)
							A		=  os.path.join(UpperCamelCase ,  "triangle.txt"	)

							with open(UpperCamelCase	) as f:
														A		=  f.readlines()

							A		=  [[int(UpperCamelCase	) for y in x.rstrip("\r\n"	).split(" "	)] for x in triangle]

							for i in range(1 ,  len(UpperCamelCase	)	):
														for j in range(len(a[i]	)	):
																					A		=  a[i - 1][j] if j != len(a[i - 1]	) else 0
																					A		=  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  A__    (      UpperCamelCase ,  UpperCamelCase	):
							for index, item in enumerate(UpperCamelCase	):
														if item == target:
																					return index
							return -1






def  A__    (      UpperCamelCase ,  UpperCamelCase ,  UpperCamelCase ,  UpperCamelCase	):
							if not (0 <= high < len(UpperCamelCase	) and 0 <= low < len(UpperCamelCase	)):
														raise Exception("Invalid upper or lower bound!"	)
							if high < low:
														return -1
							if sequence[low] == target:
														return low
							if sequence[high] == target:
														return high
							return rec_linear_search(UpperCamelCase ,  low + 1 ,  high - 1 ,  UpperCamelCase	)


if __name__ == "__main__":
		_snake_case					:		int							=			input('Enter numbers separated by comma:\n').strip()
		_snake_case					:		int							=			[int(item.strip()) for item in user_input.split(',')]

		_snake_case					:		Union[str, Any]							=			int(input('Enter a single number to be found in the list:\n').strip())
		_snake_case					:		List[Any]							=			linear_search(sequence, target)
		if result != -1:
				print(F"""linear_search({sequence}, {target}) = {result}""")
		else:
				print(F"""{target} was not found in {sequence}""")


