


def 				__lowerCamelCase						( UpperCAmelCase_						:		int = 5000_0000						):




      """simple docstring"""





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

      a						:Dict 							=       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:
            a						:int 							=       primea * primea
            for primea in primes:
                  a						:List[Any] 							=       primea * primea * primea
                  if square + cube >= limit - 16:
                        break
                  for primea in primes:
                        a						:List[Any] 							=       primea * primea * primea * primea
                        a						:str 							=       square + cube + tetr
                        if total >= limit:
                              break
                        ret.add(UpperCAmelCase_						)

      return len(UpperCAmelCase_						)


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









def 				__lowerCamelCase						( UpperCAmelCase_						:		int = 100_0000						):




      """simple docstring"""





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

      a						:Union[str, Any] 							=       [float(UpperCAmelCase_						) for n in range(limit + 1						)]

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

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


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





