

import functools


def   __SCREAMING_SNAKE_CASE					(SCREAMING_SNAKE_CASE__  ,		SCREAMING_SNAKE_CASE__       ):
						snake_case_   =	len(SCREAMING_SNAKE_CASE__       )
						snake_case_   =	len(SCREAMING_SNAKE_CASE__       )

						@functools.cache
						def min_distance(SCREAMING_SNAKE_CASE__  ,		SCREAMING_SNAKE_CASE__       ) -> 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
												snake_case_   =	int(worda[indexa] != worda[indexa]       )  # current letters not identical
												return min(
												    1 + min_distance(indexa + 1  ,		SCREAMING_SNAKE_CASE__       )  ,		1 + min_distance(SCREAMING_SNAKE_CASE__  ,		indexa + 1       )  ,		diff + min_distance(indexa + 1  ,		indexa + 1       )  ,		)

						return min_distance(0  ,		0       )


if __name__ == "__main__":
					import doctest

					doctest.testmod()
"""simple docstring"""


import math






def 			__UpperCAmelCase    (	lowercase						):







  """simple docstring"""
  _UpperCAmelCase         =					[]
  _UpperCAmelCase         =					2
  _UpperCAmelCase         =					int(math.sqrt(lowercase						)						)  # Size of every segment
  _UpperCAmelCase         =					[True] * (end + 1)
  _UpperCAmelCase         =					[]

  while start <= end:
    if temp[start] is True:
      in_prime.append(lowercase						)
      for i in range(start * start      ,end + 1      ,lowercase						):
        _UpperCAmelCase         =					False
    start += 1
  prime += in_prime

  _UpperCAmelCase         =					end + 1
  _UpperCAmelCase         =					min(2 * end      ,lowercase						)

  while low <= n:
    _UpperCAmelCase         =					[True] * (high - low + 1)
    for each in in_prime:
      _UpperCAmelCase         =					math.floor(low / each						) * each
      if t < low:
        t += each

      for j in range(lowercase      ,high + 1      ,lowercase						):
        _UpperCAmelCase         =					False

    for j in range(len(lowercase						)						):
      if temp[j] is True:
        prime.append(j + low						)

    _UpperCAmelCase         =					high + 1
    _UpperCAmelCase         =					min(high + end      ,lowercase						)

  return prime

print(sieve(1_0**6))
