


'''simple docstring'''






from collections.abc import Iterator, MutableMapping
from dataclasses import dataclass
from typing import Generic, TypeVar

__A					:  Dict											=      TypeVar("KEY")
__A					:  Any											=      TypeVar("VAL")






@dataclass(frozen=_SCREAMING_SNAKE_CASE	,slots=_SCREAMING_SNAKE_CASE)
class    __snake_case       (   Generic[KEY, VAL]):







    """simple docstring"""



    lowercase    =					42
    lowercase    =					42







class    __snake_case       (   _Item):







    """simple docstring"""



    def __init__(   self    :  Dict		)   ->  None:
      super().__init__(lowerCamelCase    ,						lowerCamelCase		)





    def __bool__(   self    :  Any		)   ->  bool:
      return False







__A					:  str											=      _DeletedItem()






class    __snake_case       (   MutableMapping[KEY, VAL]):







    """simple docstring"""



    def __init__(   self    :  str    ,						lowerCamelCase    :  int = 8    ,						lowerCamelCase    :  float = 0.75		)   ->  None:
      lowerCAmelCase_			:      Dict			=   initial_block_size
      lowerCAmelCase_			:      list[_Item | None]			=   [None] * initial_block_size
      assert 0.0 < capacity_factor < 1.0
      lowerCAmelCase_			:      Optional[Any]			=   capacity_factor
      lowerCAmelCase_			:      str			=   0

    def __lowercase   (   self    :  List[Any]    ,						lowerCamelCase    :  KEY		)   ->  int:
      return hash(lowerCamelCase		) % len(self._buckets		)

    def __lowercase   (   self    :  List[Any]    ,						lowerCamelCase    :  int		)   ->  int:
      return (ind + 1) % len(self._buckets		)

    def __lowercase   (   self    :  Optional[int]    ,						lowerCamelCase    :  int    ,						lowerCamelCase    :  KEY    ,						lowerCamelCase    :  VAL		)   ->  bool:
      lowerCAmelCase_			:      Dict			=   self._buckets[ind]
      if not stored:
        lowerCAmelCase_			:      List[Any]			=   _Item(lowerCamelCase    ,						lowerCamelCase		)
        self._len += 1
        return True
      elif stored.key == key:
        lowerCAmelCase_			:      List[Any]			=   _Item(lowerCamelCase    ,						lowerCamelCase		)
        return True
      else:
        return False

    def __lowercase   (   self    :  Union[str, Any]		)   ->  bool:
      lowerCAmelCase_			:      List[Any]			=   len(self._buckets		) * self._capacity_factor
      return len(self		) >= int(lowerCamelCase		)

    def __lowercase   (   self    :  Optional[Any]		)   ->  bool:
      if len(self._buckets		) <= self._initial_block_size:
        return False
      lowerCAmelCase_			:      Tuple			=   len(self._buckets		) * self._capacity_factor / 2
      return len(self		) < limit

    def __lowercase   (   self    :  Optional[int]    ,						lowerCamelCase    :  int		)   ->  None:
      lowerCAmelCase_			:      Tuple			=   self._buckets
      lowerCAmelCase_			:      Optional[Any]			=   [None] * new_size
      lowerCAmelCase_			:      Optional[int]			=   0
      for item in old_buckets:
        if item:
          self._add_item(item.key    ,						item.val		)

    def __lowercase   (   self    :  Optional[Any]		)   ->  None:
      self._resize(len(self._buckets		) * 2		)

    def __lowercase   (   self    :  Any		)   ->  None:
      self._resize(len(self._buckets		) // 2		)

    def __lowercase   (   self    :  List[str]    ,						lowerCamelCase    :  KEY		)   ->  Iterator[int]:
      lowerCAmelCase_			:      Dict			=   self._get_bucket_index(lowerCamelCase		)
      for _ in range(len(self._buckets		)		):
        yield ind
        lowerCAmelCase_			:      Optional[int]			=   self._get_next_ind(lowerCamelCase		)

    def __lowercase   (   self    :  int    ,						lowerCamelCase    :  KEY    ,						lowerCamelCase    :  VAL		)   ->  None:
      for ind in self._iterate_buckets(lowerCamelCase		):
        if self._try_set(lowerCamelCase    ,						lowerCamelCase    ,						lowerCamelCase		):
          break

    def __setitem__(   self    :  Dict    ,						lowerCamelCase    :  KEY    ,						lowerCamelCase    :  VAL		)   ->  None:
      if self._is_full():
        self._size_up()

      self._add_item(lowerCamelCase    ,						lowerCamelCase		)

    def __delitem__(   self    :  int    ,						lowerCamelCase    :  KEY		)   ->  None:
      for ind in self._iterate_buckets(lowerCamelCase		):
        lowerCAmelCase_			:      List[str]			=   self._buckets[ind]
        if item is None:
          raise KeyError(lowerCamelCase		)
        if item is _deleted:
          continue
        if item.key == key:
          lowerCAmelCase_			:      int			=   _deleted
          self._len -= 1
          break
      if self._is_sparse():
        self._size_down()

    def __getitem__(   self    :  Dict    ,						lowerCamelCase    :  KEY		)   ->  VAL:
      for ind in self._iterate_buckets(lowerCamelCase		):
        lowerCAmelCase_			:      Optional[int]			=   self._buckets[ind]
        if item is None:
          break
        if item is _deleted:
          continue
        if item.key == key:
          return item.val
      raise KeyError(lowerCamelCase		)

    def __len__(   self    :  Dict		)   ->  int:
      return self._len

    def __iter__(   self    :  Optional[int]		)   ->  Iterator[KEY]:
      yield from (item.key for item in self._buckets if item)





    def __repr__(   self    :  str		)   ->  str:
      lowerCAmelCase_			:      Optional[int]			=   """ ,""".join(
          F'{item.key}: {item.val}' for item in self._buckets if item		)
      return F'HashMap({val_string})'







'''simple docstring'''






def 				UpperCamelCase_			(    A__					:   int = 10_00					):
  '''simple docstring'''





  lowerCAmelCase_			:      Optional[Any]			=   3
  lowerCAmelCase_			:      Dict			=   0
  while a < n:
    if a % 3 == 0 or a % 5 == 0:
      result += a
    elif a % 15 == 0:
      result -= a
    a += 1
  return result


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



