

import math

def      snake_case__      (   SCREAMING_SNAKE_CASE_		:   int      ):



     '''simple docstring'''





     lowercase__   :       List[str]				=	[]
     lowercase__   :       Optional[Any]				=	2
     lowercase__   :       int				=	int(math.sqrt(SCREAMING_SNAKE_CASE_      )      )  # Size of every segment
     lowercase__   :       Tuple				=	[True] * (end + 1)
     lowercase__   :       int				=	[]

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

     lowercase__   :       str				=	end + 1
     lowercase__   :       Any				=	min(2 * end     ,					SCREAMING_SNAKE_CASE_      )

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

               for j in range(SCREAMING_SNAKE_CASE_     ,					high + 1     ,					SCREAMING_SNAKE_CASE_      ):
                    lowercase__   :       List[Any]				=	False

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

          lowercase__   :       Union[str, Any]				=	high + 1
          lowercase__   :       Union[str, Any]				=	min(high + end     ,					SCREAMING_SNAKE_CASE_      )

     return prime

print(sieve(10**6))




def      snake_case__      (   SCREAMING_SNAKE_CASE_		:   int = 50_000_000      ):



     '''simple docstring'''





     lowercase__   :       List[Any]				=	set()
     lowercase__   :       Any				=	int((limit - 24) ** (1 / 2)      )

     lowercase__   :       Any				=	set(range(3     ,					prime_square_limit + 1     ,					2      )      )
     primes.add(2      )
     for p in range(3     ,					prime_square_limit + 1     ,					2      ):
          if p not in primes:
               continue
          primes.difference_update(set(range(p * p     ,					prime_square_limit + 1     ,					SCREAMING_SNAKE_CASE_      )      )      )

     for primea in primes:
          lowercase__   :       Any				=	primea * primea
          for primea in primes:
               lowercase__   :       Optional[int]				=	primea * primea * primea
               if square + cube >= limit - 16:
                    break
               for primea in primes:
                    lowercase__   :       Dict				=	primea * primea * primea * primea
                    lowercase__   :       List[Any]				=	square + cube + tetr
                    if total >= limit:
                         break
                    ret.add(SCREAMING_SNAKE_CASE_      )

     return len(SCREAMING_SNAKE_CASE_      )


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

