




'''simple docstring'''





def       __a      (  _UpperCamelCase:       str       )		->					int:

     """simple docstring"""




     _snake_case				= hex_num.strip()
     if not hex_num:
          raise ValueError("No value was passed to the function"       )

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

     try:
          _snake_case				= int(_UpperCamelCase   ,		16       )
     except ValueError:
          raise ValueError("Invalid value was passed to the function"       )

     _snake_case				= ""
     while int_num > 0:
          _snake_case				= 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 ceil





def       __a      (  _UpperCamelCase:       int = 1_001       )		->					int:

     """simple docstring"""




     _snake_case				= 1

     for i in range(1   ,		int(ceil(n / 2.0       )       )       ):
          _snake_case				= 2 * i + 1
          _snake_case				= 2 * i
          _snake_case				= total + 4 * odd**2 - 6 * even

     return total


if __name__ == "__main__":
   import sys

   if len(sys.argv) == 1:
      print(solution())
   else:
      try:
         UpperCamelCase_		:     int          =		int(sys.argv[1])
         print(solution(n))
      except ValueError:
         print('''Invalid entry - please enter a number''')


