
"""simple docstring"""

def 							A						(    snake_case				:str		)				->     int:
 __UpperCamelCase      =	hex_num.strip()
 if not hex_num:
  raise ValueError('No value was passed to the function'		)

 __UpperCamelCase      =	hex_num[0] == "-"
 if is_negative:
  __UpperCamelCase      =	hex_num[1:]

 try:
  __UpperCamelCase      =	int(_SCREAMING_SNAKE_CASE    , 1_6		)
 except ValueError:
  raise ValueError('Invalid value was passed to the function'		)

 __UpperCamelCase      =	""
 while int_num > 0:
  __UpperCamelCase      =	str(int_num % 2		) + bin_str
  int_num >>= 1

 return int(('-' + bin_str) if is_negative else bin_str		)


if __name__ == "__main__":
      import doctest

      doctest.testmod()





"""simple docstring"""

from math import isqrt






def 							A						(    snake_case				:int		)				->     list[int]:
 __UpperCamelCase      =	[True] * max_number
 for i in range(2    , isqrt(max_number - 1		) + 1		):
  if is_prime[i]:
   for j in range(i**2    , snake_case    , snake_case		):
    __UpperCamelCase      =	False

 return [i for i in range(2    , snake_case		) if is_prime[i]]






def 							A						(    snake_case				:int = 1_0**8		)				->     int:
 __UpperCamelCase      =	calculate_prime_numbers(max_number // 2		)

 __UpperCamelCase      =	0
 __UpperCamelCase      =	0
 __UpperCamelCase      =	len(snake_case		) - 1
 while left <= right:
  while prime_numbers[left] * prime_numbers[right] >= max_number:
   right -= 1
  semiprimes_count += right - left + 1
  left += 1

 return semiprimes_count


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



