






"""simple docstring"""



def       snake_case__		(   _SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			)    ->int:
 # The longer word should come first
 if len(lowerCamelCase__			) < len(lowerCamelCase__			):
  return levenshtein_distance(lowerCamelCase__       ,	lowerCamelCase__			)

 if len(lowerCamelCase__			) == 0:
  return len(lowerCamelCase__			)

 UpperCAmelCase__ 						=				list(range(len(lowerCamelCase__			) + 1			)			)

 for i, ca in enumerate(lowerCamelCase__			):
  UpperCAmelCase__ 						=				[i + 1]

  for j, ca in enumerate(lowerCamelCase__			):
   # Calculate insertions, deletions and substitutions
   UpperCAmelCase__ 						=				previous_row[j + 1] + 1
   UpperCAmelCase__ 						=				current_row[j] + 1
   UpperCAmelCase__ 						=				previous_row[j] + (ca != ca)

   # Get the minimum to append to the current row
   current_row.append(min(lowerCamelCase__       ,	lowerCamelCase__       ,	lowerCamelCase__			)			)

  # Store the previous row
  UpperCAmelCase__ 						=				current_row

 # Returns the last element (distance)
 return previous_row[-1]


if __name__ == "__main__":
 a  :						Optional[int]					       =							input('''Enter the first word:\n''').strip()
 a  :						str					       =							input('''Enter the second word:\n''').strip()

 a  :						str					       =							levenshtein_distance(first_word, second_word)
 print(F'''Levenshtein distance between {first_word} and {second_word} is {result}''')









'''simple docstring'''




import os




def     snake_case__     (			) -> int:
					A_			:  List[str]			=				os.path.dirname(os.path.realpath(lowerCamelCase__      )      )
					A_			:  str			=				os.path.join(lowerCamelCase__      ,		'''triangle.txt'''      )

					with open(lowerCamelCase__      ) as in_file:
										A_			:  List[str]			=				[[int(lowerCamelCase__      ) for i in line.split()] for line in in_file]

					while len(lowerCamelCase__      ) != 1:
										A_			:  List[str]			=				triangle.pop()
										A_			:  Optional[Any]			=				triangle[-1]
										for j in range(len(lowerCamelCase__      ) - 1      ):
															curr_row[j] += max(last_row[j]      ,		last_row[j + 1]      )
					return triangle[0][0]


if __name__ == "__main__":
							print(solution())



