




def 							_UpperCAmelCase  (UpperCamelCase_ : int = 1000000       ):
				'''simple docstring'''
				_lowerCAmelCase    :    List[str]										=      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_       )       )       )

				_lowerCAmelCase    :    Optional[int]										=      [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() = }''')







from math import loga




def 							_UpperCAmelCase  (UpperCamelCase_ : int       ):
				'''simple docstring'''
				if a < 0:
								raise ValueError("""Input value must be a positive integer"""       )
				elif isinstance(UpperCamelCase_      ,    UpperCamelCase_       ):
								raise TypeError("""Input value must be a 'int' type"""       )
				return 0 if (a == 0) else int(loga(a & -a       )       )


if __name__ == "__main__":
	import doctest

	doctest.testmod()

