'''simple docstring'''




import os

def _lowercase	(      lowerCamelCase__ = "input.txt"						)					->       int:





       """simple docstring"""


       with open(os.path.join(os.path.dirname(lowerCamelCase__						)							,    lowerCamelCase__						)						) as input_file:
              __UpperCAmelCase  :				str       				=		[
                  [int(lowerCamelCase__						) for element in line.split(","						)]
                  for line in input_file.readlines()
              ]

       __UpperCAmelCase  :				Dict       				=		len(lowerCamelCase__						)
       __UpperCAmelCase  :				Optional[int]       				=		len(matrix[0]						)

       __UpperCAmelCase  :				int       				=		[[-1 for _ in range(lowerCamelCase__						)] for _ in range(lowerCamelCase__						)]
       for i in range(lowerCamelCase__						):
              __UpperCAmelCase  :				List[str]       				=		matrix[i][0]

       for j in range(1							,    lowerCamelCase__						):
              for i in range(lowerCamelCase__						):
                     __UpperCAmelCase  :				Optional[Any]       				=		minimal_path_sums[i][j - 1] + matrix[i][j]

              for i in range(1							,    lowerCamelCase__						):
                     __UpperCAmelCase  :				str       				=		min(
                         minimal_path_sums[i][j]							,    minimal_path_sums[i - 1][j] + matrix[i][j]						)

              for i in range(rows - 2							,    -1							,    -1						):
                     __UpperCAmelCase  :				Dict       				=		min(
                         minimal_path_sums[i][j]							,    minimal_path_sums[i + 1][j] + matrix[i][j]						)

       return min(minimal_path_sums_row[-1] for minimal_path_sums_row in minimal_path_sums						)


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







'''simple docstring'''




from maths.is_square_free import is_square_free
from maths.prime_factors import prime_factors

def _lowercase	(      lowerCamelCase__						)					->       int:





       """simple docstring"""


       __UpperCAmelCase  :				Any       				=		prime_factors(lowerCamelCase__						)
       if is_square_free(lowerCamelCase__						):
              return -1 if len(lowerCamelCase__						) % 2 else 1
       return 0


if __name__ == "__main__":
   import doctest

   doctest.testmod()






