




"""simple docstring"""
import os





def 						UpperCAmelCase				(			)  ->     Union[str, Any]:
			__lowerCamelCase					:	Tuple	       =				os.path.dirname(os.path.realpath(__snake_case     )     )
			__lowerCamelCase					:	Any	       =				os.path.join(__snake_case							,				'triangle.txt'     )

			with open(__snake_case     ) as f:
						__lowerCamelCase					:	Any	       =				f.readlines()

			__lowerCamelCase					:	Dict	       =				[]
			for line in triangle:
						__lowerCamelCase					:	Union[str, Any]	       =				[]
						for number in line.strip().split(' '     ):
									numbers_from_line.append(int(__snake_case     )     )
						a.append(__snake_case     )

			for i in range(1							,				len(__snake_case     )     ):
						for j in range(len(a[i]     )     ):
									__lowerCamelCase					:	Optional[int]	       =				a[i - 1][j] if j != len(a[i - 1]     ) else 0
									__lowerCamelCase					:	Dict	       =				a[i - 1][j - 1] if j > 0 else 0
									a[i][j] += max(__snake_case							,				__snake_case     )
			return max(a[-1]     )


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









"""simple docstring"""
def 						UpperCAmelCase				(			A__:    Dict     )  ->     Optional[int]:
			stooge(A__							,				0							,				len(A__     ) - 1     )
			return arr





def 						UpperCAmelCase				(			A__:    Dict							,				A__:    List[str]							,				A__:    Optional[int]     )  ->     Any:
			if i >= h:
						return

			# If first element is smaller than the last then swap them
			if arr[i] > arr[h]:
						__lowerCamelCase       ,      __lowerCamelCase					:	Dict	       =				arr[h], arr[i]

			# If there are more than 2 elements in the array
			if h - i + 1 > 2:
						__lowerCamelCase					:	str	       =				(int)((h - i + 1) / 3     )

						# Recursively sort first 2/3 elements
						stooge(A__							,				A__							,				(h - t)     )

						# Recursively sort last 2/3 elements
						stooge(A__							,				i + t							,				(A__)     )

						# Recursively sort first 2/3 elements
						stooge(A__							,				A__							,				(h - t)     )


if __name__ == "__main__":
					a_				:    Tuple										=     input('''Enter numbers separated by a comma:\n''').strip()
					a_				:    Optional[Any]										=     [int(item) for item in user_input.split(''',''')]
					print(stooge_sort(unsorted))



