

'''simple docstring'''






import functools


def 	_A  (					A__  ,       A__   ):






 """simple docstring"""



 __lowercase													=				len(A__   )
 __lowercase													=				len(A__   )

 @functools.cache
 def min_distance(A__  ,       A__   ) -> int:
  # if first word index is overflow - delete all from the second word
  if indexa >= len_worda:
   return len_worda - indexa
  # if second word index is overflow - delete all from the first word
  if indexa >= len_worda:
   return len_worda - indexa
  __lowercase													=				int(worda[indexa] != worda[indexa]   )  # current letters not identical
  return min(
      1 + min_distance(indexa + 1  ,       A__   )  ,       1 + min_distance(A__  ,       indexa + 1   )  ,       diff + min_distance(indexa + 1  ,       indexa + 1   )  ,       )

 return min_distance(0  ,       0   )


if __name__ == "__main__":
 import doctest

 doctest.testmod()




'''simple docstring'''






def 	_A  (					A__ = 1000000   ):






 """simple docstring"""



 __lowercase													=				set(range(3  ,       A__  ,       2   )   )
 primes.add(2   )
 for p in range(3  ,       A__  ,       2   ):
  if p not in primes:
   continue
  primes.difference_update(set(range(p * p  ,       A__  ,       A__   )   )   )

 __lowercase													=				[float(A__   ) for n in range(limit + 1   )]

 for p in primes:
  for n in range(A__  ,       limit + 1  ,       A__   ):
   phi[n] *= 1 - 1 / p

 return int(sum(phi[2:]   )   )


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

