
import os


def       A       (					)   ->  Any:
		'''simple docstring'''

		UpperCamelCase		=     os.path.dirname(os.path.realpath(lowercase ) )
		UpperCamelCase		=     os.path.join(lowercase    ,       'triangle.txt' )

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

		UpperCamelCase		=     []
		for line in triangle:
				UpperCamelCase		=     []
				for number in line.strip().split(' ' ):
						numbers_from_line.append(int(lowercase ) )
				a.append(lowercase )

		for i in range(1    ,       len(lowercase ) ):
				for j in range(len(a[i] ) ):
						UpperCamelCase		=     a[i - 1][j] if j != len(a[i - 1] ) else 0
						UpperCamelCase		=     a[i - 1][j - 1] if j > 0 else 0
						a[i][j] += max(lowercase    ,       lowercase )
		return max(a[-1] )


if __name__ == "__main__":
					print(solution())


def       A       (					lowercase    ,       lowercase    ,       lowercase    ,       lowercase    ,       lowercase )   ->  int:
		'''simple docstring'''

		if index == number_of_items:
				return 0
		UpperCamelCase		=     0
		UpperCamelCase		=     0
		UpperCamelCase		=     knapsack(lowercase    ,       lowercase    ,       lowercase    ,       lowercase    ,       index + 1 )
		if weights[index] <= max_weight:
				UpperCamelCase		=     values[index] + knapsack(
				    lowercase    ,       lowercase    ,       lowercase    ,       max_weight - weights[index]    ,       index + 1 )
		return max(lowercase    ,       lowercase )


if __name__ == "__main__":
					import doctest

					doctest.testmod()
