


import math



def       _lowerCAmelCase    (				lowerCAmelCase_				:int				)->int:
   '''simple docstring'''






   if not isinstance(lowerCAmelCase_		,    lowerCAmelCase_				):
      snake_case_            =       F'''Input value of [number={number}] must be an integer'''
      raise TypeError(lowerCAmelCase_				)

   if number < 1:
      snake_case_            =       F'''Input value of [number={number}] must be > 0'''
      raise ValueError(lowerCAmelCase_				)
   elif number == 1:
      return 3
   elif number == 2:
      return 5
   else:
      snake_case_            =       int(math.log(number // 3		,    2				)				) + 2

      snake_case_            =       [3, 5]
      snake_case_            =       2
      snake_case_            =       3
      for block in range(1		,    lowerCAmelCase_				):
         for _ in range(lowerCAmelCase_				):
            proth_list.append(2 ** (block + 1) + proth_list[proth_index - 1]				)
            proth_index += 1
         increment *= 2

   return proth_list[number - 1]


if __name__ == "__main__":
   import doctest

   doctest.testmod()

   for number in range(11):
      SCREAMING_SNAKE_CASE						:Any			=  0
      try:
         SCREAMING_SNAKE_CASE						:int			=  proth(number)
      except ValueError:
         print(F'''ValueError: there is no {number}th Proth number''')
         continue

      print(F'''The {number}th Proth number: {value}''')








from collections import deque

from .hash_table import HashTable


class      __lowerCAmelCase  (			a       ):






  """simple docstring"""





  def __init__(  self							:							int     ,					*_lowerCAmelCase							:							List[Any]     ,					**_lowerCAmelCase							:							Any	) ->			Union[str, Any]:




     """simple docstring"""
     super().__init__(*_lowerCAmelCase     ,					**_lowerCAmelCase	)



  def        lowerCAmelCase__	(  self							:							Tuple     ,					_lowerCAmelCase							:							Optional[int]     ,					_lowerCAmelCase							:							List[Any]	) ->			List[Any]:




     """simple docstring"""
     snake_case_            =       deque([]	) if self.values[key] is None else self.values[key]
     self.values[key].appendleft(_lowerCAmelCase	)
     snake_case_            =       self.values[key]



  def        lowerCAmelCase__	(  self							:							List[str]	) ->			List[Any]:




     """simple docstring"""
     return (
         sum(self.charge_factor - len(_lowerCAmelCase	) for slot in self.values	)
         / self.size_table
         * self.charge_factor
     )



  def        lowerCAmelCase__	(  self							:							List[str]     ,					_lowerCAmelCase							:							Any     ,					_lowerCAmelCase							:							List[str]=None	) ->			int:




     """simple docstring"""
     if not (
         len(self.values[key]	) == self.charge_factor and self.values.count(_lowerCAmelCase	) == 0
     ):
        return key
     return super()._collision_resolution(_lowerCAmelCase     ,					_lowerCAmelCase	)




