from collections.abc import Iterable
from typing import Generic, TypeVar

_UpperCAmelCase	:     Tuple		       = TypeVar("""_T""")







class 				lowercase       ( Generic[_T]    ):




				def __init__(      self   ,     snake_case = None ):
											snake_case_           =					list(iterable or [] )
											snake_case_           =					[]




				def __len__(      self ):
											return len(self._stacka ) + len(self._stacka )




				def __repr__(      self ):
											return F'''Queue({tuple(self._stacka[::-1] + self._stacka )})'''




				def 					a							(      self   ,     snake_case ):
											self._stacka.append(snake_case )




				def 					a							(      self ):
											snake_case_           =					self._stacka.pop
											snake_case_           =					self._stacka.append

											if not self._stacka:
																		while self._stacka:
																									stacka_append(stacka_pop() )

											if not self._stacka:
																		raise IndexError('Queue is empty' )
											return self._stacka.pop()


if __name__ == "__main__":
					from doctest import testmod

					testmod()







def       __lowerCamelCase			(				UpperCamelCase__ = 50000000   ):







							'''simple docstring'''






							snake_case_           =					set()
							snake_case_           =					int((limit - 24) ** (1 / 2)   )

							snake_case_           =					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     ,							UpperCamelCase__   )   )   )

							for primea in primes:
														snake_case_           =					primea * primea
														for primea in primes:
																					snake_case_           =					primea * primea * primea
																					if square + cube >= limit - 16:
																												break
																					for primea in primes:
																												snake_case_           =					primea * primea * primea * primea
																												snake_case_           =					square + cube + tetr
																												if total >= limit:
																																			break
																												ret.add(UpperCamelCase__   )

							return len(UpperCamelCase__   )


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




