





import os






def     lowerCamelCase__			(__lowerCamelCase = "matrix.txt"	):
     with open(os.path.join(os.path.dirname(__UpperCamelCase	),       __UpperCamelCase	)	) as in_file:
          _SCREAMING_SNAKE_CASE       :	List[Any]						    =							in_file.read()

     _SCREAMING_SNAKE_CASE       :	Dict						    =							[[int(__UpperCamelCase	) for cell in row.split(","	)] for row in data.strip().splitlines()]
     _SCREAMING_SNAKE_CASE       :	Optional[int]						    =							[[0 for cell in row] for row in grid]
     _SCREAMING_SNAKE_CASE       :	Optional[int]						    =							len(grid[0]	)

     _SCREAMING_SNAKE_CASE       :	int						    =							[[0 for i in range(__UpperCamelCase	)] for j in range(__UpperCamelCase	)]
     _SCREAMING_SNAKE_CASE       :	Dict						    =							grid[0][0]
     for i in range(1,       __UpperCamelCase	):
          _SCREAMING_SNAKE_CASE       :	Tuple						    =							grid[0][i] + dp[0][i - 1]
     for i in range(1,       __UpperCamelCase	):
          _SCREAMING_SNAKE_CASE       :	Union[str, Any]						    =							grid[i][0] + dp[i - 1][0]

     for i in range(1,       __UpperCamelCase	):
          for j in range(1,       __UpperCamelCase	):
               _SCREAMING_SNAKE_CASE       :	str						    =							grid[i][j] + min(dp[i - 1][j],       dp[i][j - 1]	)

     return dp[-1][-1]


if __name__ == "__main__":
       print(f"{solution() = }")






import cmath
import math






def     lowerCamelCase__			(__lowerCamelCase,       __lowerCamelCase,       __lowerCamelCase,       __lowerCamelCase	):
     _SCREAMING_SNAKE_CASE       :	Any						    =							math.radians(__lowerCamelCase	)
     _SCREAMING_SNAKE_CASE       :	Tuple						    =							math.radians(__lowerCamelCase	)

     # Convert voltage and current to rectangular form
     _SCREAMING_SNAKE_CASE       :	str						    =							cmath.rect(__lowerCamelCase,       __lowerCamelCase	)
     _SCREAMING_SNAKE_CASE       :	str						    =							cmath.rect(__lowerCamelCase,       __lowerCamelCase	)

     # Calculate apparent power
     return voltage_rect * current_rect


if __name__ == "__main__":
       import doctest

       doctest.testmod()