"""simple docstring"""





import numpy as np


def    lowercase_   (   _lowerCamelCase:	Tuple						,   _lowerCamelCase:	Union[str, Any]						,   _lowerCamelCase:	List[str]						,   _lowerCamelCase:	Tuple						,   _lowerCamelCase:	Union[str, Any]      ) ->      List[Any]:



							'''simple docstring'''

							__lowerCamelCase					:		Union[str, Any]		   =     int(np.ceil((x_end - xa) / h      )      )
							__lowerCamelCase					:		Optional[int]		   =     np.zeros((n + 1,)      )
							__lowerCamelCase					:		List[str]		   =     ya
							__lowerCamelCase					:		List[Any]		   =     xa

							for k in range(_lowerCamelCase      ):
														__lowerCamelCase					:		Dict		   =     f(_lowerCamelCase						,   y[k]      )
														__lowerCamelCase					:		Optional[int]		   =     f(x + 0.5 * h						,   y[k] + 0.5 * h * ka      )
														__lowerCamelCase					:		Optional[int]		   =     f(x + 0.5 * h						,   y[k] + 0.5 * h * ka      )
														__lowerCamelCase					:		int		   =     f(x + h						,   y[k] + h * ka      )
														__lowerCamelCase					:		int		   =     y[k] + (1 / 6) * h * (ka + 2 * ka + 2 * ka + ka)
														x += h

							return y


if __name__ == "__main__":
				import doctest

				doctest.testmod()
"""simple docstring"""





import os


def    lowercase_   (   ) ->      List[str]:



							'''simple docstring'''

							__lowerCamelCase					:		Union[str, Any]		   =     os.path.dirname(os.path.realpath(_lowerCamelCase      )      )
							__lowerCamelCase					:		int		   =     os.path.join(_lowerCamelCase						,   "triangle.txt"      )

							with open(_lowerCamelCase      ) as f:
														__lowerCamelCase					:		List[str]		   =     f.readlines()

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

							for i in range(1						,   len(_lowerCamelCase      )      ):
														for j in range(len(a[i]      )      ):
																					__lowerCamelCase					:		int		   =     a[i - 1][j] if j != len(a[i - 1]      ) else 0
																					__lowerCamelCase					:		Union[str, Any]		   =     a[i - 1][j - 1] if j > 0 else 0
																					a[i][j] += max(_lowerCamelCase						,   _lowerCamelCase      )
							return max(a[-1]      )


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