

from __future__ import annotations

import sys







def      snake_case__							(  lowerCAmelCase_,       lowerCAmelCase_     ):





     """simple docstring"""







     if abs(lowerCAmelCase_     ) == 1:
          return a, 0
     elif abs(lowerCAmelCase_     ) == 1:
          return 0, b

     SCREAMING_SNAKE_CASE		,    SCREAMING_SNAKE_CASE 		=a, b
     SCREAMING_SNAKE_CASE		,    SCREAMING_SNAKE_CASE 		=1, 0
     SCREAMING_SNAKE_CASE		,    SCREAMING_SNAKE_CASE 		=0, 1

     while remainder != 0:
          SCREAMING_SNAKE_CASE 		=old_remainder // remainder
          SCREAMING_SNAKE_CASE		,    SCREAMING_SNAKE_CASE 		=remainder, old_remainder - quotient * remainder
          SCREAMING_SNAKE_CASE		,    SCREAMING_SNAKE_CASE 		=coeff_a, old_coeff_a - quotient * coeff_a
          SCREAMING_SNAKE_CASE		,    SCREAMING_SNAKE_CASE 		=coeff_b, old_coeff_b - quotient * coeff_b

     # sign correction for negative numbers
     if a < 0:
          SCREAMING_SNAKE_CASE 		=-old_coeff_a
     if b < 0:
          SCREAMING_SNAKE_CASE 		=-old_coeff_b

     return old_coeff_a, old_coeff_b







def      snake_case__							(  ):





     """simple docstring"""







     if len(sys.argv     ) < 3:
          print('2 integer arguments required'     )
          return 1
     SCREAMING_SNAKE_CASE 		=int(sys.argv[1]     )
     SCREAMING_SNAKE_CASE 		=int(sys.argv[2]     )
     print(extended_euclidean_algorithm(lowerCAmelCase_,       lowerCAmelCase_     )     )
     return 0


if __name__ == "__main__":
 raise SystemExit(main())




import os







def      snake_case__							(  ):





     """simple docstring"""







     SCREAMING_SNAKE_CASE 		=os.path.dirname(os.path.realpath(lowerCAmelCase_     )     )
     SCREAMING_SNAKE_CASE 		=os.path.join(lowerCAmelCase_,       'triangle.txt'     )

     with open(lowerCAmelCase_     ) as f:
          SCREAMING_SNAKE_CASE 		=f.readlines()

     SCREAMING_SNAKE_CASE 		=[[int(lowerCAmelCase_     ) for y in x.rstrip('\r\n'     ).split(' '     )] for x in triangle]

     for i in range(1,       len(lowerCAmelCase_     )     ):
          for j in range(len(a[i]     )     ):
               SCREAMING_SNAKE_CASE 		=a[i - 1][j] if j != len(a[i - 1]     ) else 0
               SCREAMING_SNAKE_CASE 		=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())

