



"""simple docstring"""







def       _lowerCamelCase				(							UpperCAmelCase_ :       int = 1000000     )	-> int:






	"""simple docstring"""





	A__											=					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__											=					[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() = }')









"""simple docstring"""







def       _lowerCamelCase				(							UpperCAmelCase_ :       int     )	-> int:






	"""simple docstring"""





	if not isinstance(UpperCAmelCase_,	UpperCAmelCase_     ):
		raise ValueError("Input must be an integer"     )
	if input_num <= 0:
		raise ValueError("Input must be positive"     )
	return sum(
	    divisor for divisor in range(1,	input_num // 2 + 1     ) if input_num % divisor == 0     )


if __name__ == "__main__":
			import doctest

			doctest.testmod()




