"""simple docstring"""





def  lowercase_ ( _lowerCamelCase:						int   )			->   Tuple:



							'''simple docstring'''

							if a < 0:
														raise ValueError("Input value must be a positive integer"   )
							elif isinstance(lowercase__    , lowercase__   ):
														raise TypeError("Input value must be a 'int' type"   )
							return bin(lowercase__   ).count("1"   )


if __name__ == "__main__":
				import doctest

				doctest.testmod()



"""simple docstring"""




def       a_ (	lowercase__ :int = 10**9     ):
			__lowerCamelCase          =      1
			__lowerCamelCase          =      2

			__lowerCamelCase          =      0
			__lowerCamelCase          =      0
			__lowerCamelCase          =      0
			while perimeter <= max_perimeter:
						perimeters_sum += perimeter

						prev_value += 2 * value
						value += prev_value

						__lowerCamelCase          =      2 * value + 2 if i % 2 == 0 else 2 * value - 2
						i += 1

			return perimeters_sum


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




