"""simple docstring"""




def 							SCREAMING_SNAKE_CASE  (    _lowerCamelCase		: int = 50000000			) ->   int:
  _lowerCAmelCase		: Union[str, Any]						    =  set()
  _lowerCAmelCase		: Tuple						    =  int((limit - 24) ** (1 / 2)			)

  _lowerCAmelCase		: str						    =  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    ,_lowerCamelCase			)			)			)

  for primea in primes:
    _lowerCAmelCase		: Optional[Any]						    =  primea * primea
    for primea in primes:
      _lowerCAmelCase		: Any						    =  primea * primea * primea
      if square + cube >= limit - 16:
        break
      for primea in primes:
        _lowerCAmelCase		: int						    =  primea * primea * primea * primea
        _lowerCAmelCase		: Union[str, Any]						    =  square + cube + tetr
        if total >= limit:
          break
        ret.add(_lowerCamelCase			)

  return len(_lowerCamelCase			)


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





"""simple docstring"""




def 							SCREAMING_SNAKE_CASE  (    _lowerCamelCase		: int = 1000000			) ->   int:
  _lowerCAmelCase		: List[str]						    =  [i - 1 for i in range(limit + 1			)]

  for i in range(2    ,limit + 1			):
    if phi[i] == i - 1:
      for j in range(2 * i    ,limit + 1    ,_lowerCamelCase			):
        phi[j] -= phi[j] // i

  return sum(phi[2 : limit + 1]			)


if __name__ == "__main__":
     print(solution())




