




def 						_A						(						_lowercase			,       _lowercase				)			->				int:


     """simple docstring"""


     if len(_lowercase				) < len(_lowercase				):
          return levenshtein_distance(_lowercase			,       _lowercase				)

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

     __UpperCamelCase				=	list(range(len(_lowercase				) + 1				)				)

     for i, ca in enumerate(_lowercase				):
          __UpperCamelCase				=	[i + 1]

          for j, ca in enumerate(_lowercase				):
               # 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(_lowercase			,       _lowercase			,       _lowercase				)				)

          # Store the previous row
          __UpperCamelCase				=	current_row

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


if __name__ == "__main__":
    __snake_case     =		input('''Enter the first word:\n''').strip()
    __snake_case     =		input('''Enter the second word:\n''').strip()

    __snake_case     =		levenshtein_distance(first_word, second_word)
    print(f"""Levenshtein distance between {first_word} and {second_word} is {result}""")






import math






def 						_A						(						_lowercase				)			->				list:


     """simple docstring"""


     if n <= 0:
          raise ValueError('Only positive integers have prime factors'				)
     __UpperCamelCase				=	[]
     while n % 2 == 0:
          pf.append(2				)
          __UpperCamelCase				=	int(n / 2				)
     for i in range(3			,       int(math.sqrt(_lowercase				)				) + 1			,       2				):
          while n % i == 0:
               pf.append(_lowercase				)
               __UpperCamelCase				=	int(n / i				)
     if n > 2:
          pf.append(_lowercase				)
     return pf






def 						_A						(						_lowercase				)			->				int:


     """simple docstring"""


     if n <= 0:
          raise ValueError('Only positive numbers are accepted'				)
     __UpperCamelCase				=	1
     __UpperCamelCase				=	1
     while n % 2 == 0:
          temp += 1
          __UpperCamelCase				=	int(n / 2				)
     div *= temp
     for i in range(3			,       int(math.sqrt(_lowercase				)				) + 1			,       2				):
          __UpperCamelCase				=	1
          while n % i == 0:
               temp += 1
               __UpperCamelCase				=	int(n / i				)
          div *= temp
     if n > 1:
          div *= 2
     return div






def 						_A						(						_lowercase				)			->				int:


     """simple docstring"""


     if n <= 0:
          raise ValueError('Only positive numbers are accepted'				)
     __UpperCamelCase				=	1
     __UpperCamelCase				=	1
     while n % 2 == 0:
          temp += 1
          __UpperCamelCase				=	int(n / 2				)
     if temp > 1:
          s *= (2**temp - 1) / (2 - 1)
     for i in range(3			,       int(math.sqrt(_lowercase				)				) + 1			,       2				):
          __UpperCamelCase				=	1
          while n % i == 0:
               temp += 1
               __UpperCamelCase				=	int(n / i				)
          if temp > 1:
               s *= (i**temp - 1) / (i - 1)
     return int(_lowercase				)






def 						_A						(						_lowercase				)			->				int:


     """simple docstring"""


     __UpperCamelCase				=	n
     for x in set(prime_factors(_lowercase				)				):
          s *= (x - 1) / x
     return int(_lowercase				)


if __name__ == "__main__":
    import doctest

    doctest.testmod()


