


"""simple docstring"""





from .number_theory.prime_numbers import next_prime



class 		snake_case_:






     def __init__(						self	:       Union[str, Any]       ,					UpperCamelCase_	:       int       ,					UpperCamelCase_	:       int | None = None       ,					UpperCamelCase_	:       float | None = None       ,					):
           lowerCAmelCase       :						List[Any]							= size_table
           lowerCAmelCase       :						List[str]							= [None] * self.size_table
           lowerCAmelCase       :						Union[str, Any]							= 0.75 if lim_charge is None else lim_charge
           lowerCAmelCase       :						Tuple							= 1 if charge_factor is None else charge_factor
           lowerCAmelCase       :						list							= []
           lowerCAmelCase       :						dict							= {}






     def   lowerCamelCase__  (						self	:       Union[str, Any]					):
           return self._keys






     def   lowerCamelCase__  (						self	:       str					):
           return sum(1 for slot in self.values if slot is not None					) / (
               self.size_table * self.charge_factor
           )






     def   lowerCamelCase__  (						self	:       List[str]       ,					UpperCamelCase_	:       int					):
           return key % self.size_table






     def   lowerCamelCase__  (						self	:       List[Any]       ,					UpperCamelCase_	:       Any					):
           print(F'''step {step_ord}'''					)
           print(list(range(len(self.values					)					)					)					)
           print(self.values					)






     def   lowerCamelCase__  (						self	:       Optional[int]       ,					UpperCamelCase_	:       List[Any]					):
           lowerCAmelCase       :						int							= 1
           lowerCAmelCase       :						List[Any]							= values
           for value in values:
                 self.insert_data(__snake_case					)
                 self._step_by_step(__snake_case					)
                 i += 1






     def   lowerCamelCase__  (						self	:       Tuple       ,					UpperCamelCase_	:       Tuple       ,					UpperCamelCase_	:       Any					):
           lowerCAmelCase       :						Dict							= data
           lowerCAmelCase       :						Optional[int]							= data






     def   lowerCamelCase__  (						self	:       List[Any]       ,					UpperCamelCase_	:       List[str]       ,					UpperCamelCase_	:       Dict=None					):
           lowerCAmelCase       :						Any							= self.hash_function(key + 1					)

           while self.values[new_key] is not None and self.values[new_key] != key:
                 if self.values.count(__snake_case					) > 0:
                       lowerCAmelCase       :						str							= self.hash_function(new_key + 1					)
                 else:
                       lowerCAmelCase       :						Union[str, Any]							= None
                       break

           return new_key






     def   lowerCamelCase__  (						self	:       Union[str, Any]					):
           lowerCAmelCase       :						Tuple							= [value for value in self.values if value is not None]
           lowerCAmelCase       :						Optional[Any]							= next_prime(self.size_table       ,					factor=2					)
           self._keys.clear()
           lowerCAmelCase       :						Optional[Any]							= [None] * self.size_table  # hell's pointers D: don't DRY ;/
           for value in survivor_values:
                 self.insert_data(__snake_case					)






     def   lowerCamelCase__  (						self	:       int       ,					UpperCamelCase_	:       Tuple					):
           lowerCAmelCase       :						Optional[Any]							= self.hash_function(__snake_case					)

           if self.values[key] is None:
                 self._set_value(__snake_case       ,					__snake_case					)

           elif self.values[key] == data:
                 pass

           else:
                 lowerCAmelCase       :						Optional[int]							= self._collision_resolution(__snake_case       ,					__snake_case					)
                 if collision_resolution is not None:
                       self._set_value(__snake_case       ,					__snake_case					)
                 else:
                       self.rehashing()
                       self.insert_data(__snake_case					)









'''simple docstring'''






def    lowercase_   (		lowercase__ = 400_0000    ) ->int:

						if n <= 1:
												return 0
						_snake_case: Union[str, Any]	       =		0
						_snake_case: List[Any]	       =		2
						_snake_case: Any	       =		0
						while 4 * b + a <= n:
												_snake_case       ,    _snake_case: int	       =		b, 4 * b + a
												count += a
						return count + b


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





