import os







def       A__   (						):
 SCREAMING_SNAKE_CASE__: List[str]=   os.path.dirname(os.path.realpath(snake_case_   )   )
 SCREAMING_SNAKE_CASE__: Optional[int]=   os.path.join(snake_case_							,					'''triangle.txt'''   )

 with open(snake_case_   ) as f:
  SCREAMING_SNAKE_CASE__: str=   f.readlines()

 SCREAMING_SNAKE_CASE__: List[Any]=   []
 for line in triangle:
  SCREAMING_SNAKE_CASE__: 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]   )   ):
   SCREAMING_SNAKE_CASE__: Any=   a[i - 1][j] if j != len(a[i - 1]   ) else 0
   SCREAMING_SNAKE_CASE__: 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())









from typing import Any

import numpy as np
def 		_a       ( a					:np.ndarray					)				->     bool:
 return np.array_equal(a      ,				matrix.conjugate().T					)
def 		_a       ( a					:np.ndarray      ,				a					:np.ndarray					)				->     Any:
 a						    = v.conjugate().T
 a						    = v_star.dot(a					)
 assert isinstance(a      ,				np.ndarray					)
 return (v_star_dot.dot(a					)) / (v_star.dot(a					))
def 		_a       ( )				->     None:
 a						    = np.array([[2, 2 + 1j, 4], [2 - 1j, 3, 1j], [4, -1j, 1]]					)
 a						    = np.array([[1], [2], [3]]					)
 assert is_hermitian(a					), F"""{a} is not hermitian."""
 print(rayleigh_quotient(a      ,				a					)					)

 a						    = np.array([[1, 2, 4], [2, 3, -1], [4, -1, 1]]					)
 assert is_hermitian(a					), F"""{a} is not hermitian."""
 assert rayleigh_quotient(a      ,				a					) == float(3					)


if __name__ == "__main__":
     import doctest

     doctest.testmod()
     tests()


