





"""simple docstring"""
import os



def 					__lowerCamelCase       (							a_					:		str = "input.txt"							)      ->				int:

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

      __SCREAMING_SNAKE_CASE       :Tuple		    =  len(a_							)
      __SCREAMING_SNAKE_CASE       :List[str]		    =  len(matrix[0]							)

      __SCREAMING_SNAKE_CASE       :Dict		    =  [[-1 for _ in range(a_							)] for _ in range(a_							)]
      for i in range(a_							):
            __SCREAMING_SNAKE_CASE       :Optional[Any]		    =  matrix[i][0]

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

            for i in range(1			,       a_							):
                  __SCREAMING_SNAKE_CASE       :List[Any]		    =  min(
                      minimal_path_sums[i][j]			,       minimal_path_sums[i - 1][j] + matrix[i][j]							)

            for i in range(rows - 2			,       -1			,       -1							):
                  __SCREAMING_SNAKE_CASE       :Any		    =  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"""
import math
import random



def 					__lowerCamelCase       (							a_					:		float			,       a_					:		bool = False							)      ->				float:
      if deriv:
            return value * (1 - value)
      return 1 / (1 + math.exp(-value							))


# Initial Value
lowerCamelCase_       =		0.02



def 					__lowerCamelCase       (							a_					:		int			,       a_					:		int							)      ->				float:
      __SCREAMING_SNAKE_CASE       :Any		    =  float(2 * (random.randint(1			,       1_00							)) - 1							)

      for _ in range(a_							):
            # Forward propagation
            __SCREAMING_SNAKE_CASE       :Any		    =  sigmoid_function(INITIAL_VALUE * weight							)
            # How much did we miss?
            __SCREAMING_SNAKE_CASE       :Tuple		    =  (expected / 1_00) - layer_a
            # Error delta
            __SCREAMING_SNAKE_CASE       :Union[str, Any]		    =  layer_1_error * sigmoid_function(a_			,       a_							)
            # Update weight
            weight += INITIAL_VALUE * layer_1_delta

      return layer_a * 1_00


if __name__ == "__main__":
  import doctest

  doctest.testmod()

  lowerCamelCase_       =		int(input("Expected value: "))
  lowerCamelCase_       =		int(input("Number of propagations: "))
  print(forward_propagation(expected, number_propagations))