



def        __lowerCAmelCase		(	__lowerCamelCase						:     int						)	->    int:
					if not isinstance(__lowerCamelCase					, __lowerCamelCase						) or number < 0:
										raise ValueError("""Input must be a non-negative integer"""						)

					__lowerCAmelCase						 =0
					while number:
										# This way we arrive at next set bit (next 1) instead of looping
										# through each bit and checking for 1s hence the
										# loop won't run 32 times it will only run the number of `1` times
										number &= number - 1
										count += 1
					return count


if __name__ == "__main__":
				import doctest

				doctest.testmod()









def        __lowerCAmelCase		(	__lowerCamelCase						:     int						)	->    bool:
					if number < 0:
										raise ValueError("""number must not be negative"""						)
					return number & (number - 1) == 0


if __name__ == "__main__":
				import doctest

				doctest.testmod()




