



'''simple docstring'''
def A__       (	UpperCAmelCase_ = 1_0_0_0				):
						_UpperCamelCase   :						List[str]												=  3
						_UpperCamelCase   :						Any												=  0
						while a < n:
												if a % 3 == 0 or a % 5 == 0:
																		result += a
												elif a % 1_5 == 0:
																		result -= a
												a += 1
						return result


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







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

snake_case_					:      Optional[Any]    			=    TypeVar('KEY')
snake_case_					:      Dict    			=    TypeVar('VAL')






@dataclass(frozen=lowercase		,   slots=lowercase  )
class 				lowercase__      (				Generic[KEY, VAL]  ):
	lowercase__    							=     42
	lowercase__    							=     42






class 				lowercase__      (				_Item  ):





	def __init__(					self   :							Union[str, Any]					):







							'''simple docstring'''
							super().__init__(lowerCamelCase__					,lowerCamelCase__					)





	def __bool__(					self   :							Tuple					):







							'''simple docstring'''
							return False
snake_case_					:      int    			=    _DeletedItem()






class 				lowercase__      (				MutableMapping[KEY, VAL]  ):





	def __init__(					self   :							Any					,lowerCamelCase__   :							int = 8					,lowerCamelCase__   :							float = 0.7_5					):







							'''simple docstring'''
							_UpperCamelCase   :						Union[str, Any]												=  initial_block_size
							_UpperCamelCase   :						list[_Item | None]												=  [None] * initial_block_size
							assert 0.0 < capacity_factor < 1.0
							_UpperCamelCase   :						Optional[int]												=  capacity_factor
							_UpperCamelCase   :						List[Any]												=  0





	def       UpperCamelCase_    (					self   :							Optional[int]					,lowerCamelCase__   :							KEY					):







							'''simple docstring'''
							return hash(lowerCamelCase__					) % len(self._buckets					)





	def       UpperCamelCase_    (					self   :							List[Any]					,lowerCamelCase__   :							int					):







							'''simple docstring'''
							return (ind + 1) % len(self._buckets					)





	def       UpperCamelCase_    (					self   :							Union[str, Any]					,lowerCamelCase__   :							int					,lowerCamelCase__   :							KEY					,lowerCamelCase__   :							VAL					):







							'''simple docstring'''
							_UpperCamelCase   :						str												=  self._buckets[ind]
							if not stored:
													_UpperCamelCase   :						str												=  _Item(lowerCamelCase__					,lowerCamelCase__					)
													self._len += 1
													return True
							elif stored.key == key:
													_UpperCamelCase   :						Union[str, Any]												=  _Item(lowerCamelCase__					,lowerCamelCase__					)
													return True
							else:
													return False





	def       UpperCamelCase_    (					self   :							Optional[int]					):







							'''simple docstring'''
							_UpperCamelCase   :						Dict												=  len(self._buckets					) * self._capacity_factor
							return len(self					) >= int(lowerCamelCase__					)





	def       UpperCamelCase_    (					self   :							Dict					):







							'''simple docstring'''
							if len(self._buckets					) <= self._initial_block_size:
													return False
							_UpperCamelCase   :						str												=  len(self._buckets					) * self._capacity_factor / 2
							return len(self					) < limit





	def       UpperCamelCase_    (					self   :							int					,lowerCamelCase__   :							int					):







							'''simple docstring'''
							_UpperCamelCase   :						int												=  self._buckets
							_UpperCamelCase   :						Dict												=  [None] * new_size
							_UpperCamelCase   :						str												=  0
							for item in old_buckets:
													if item:
																			self._add_item(item.key					,item.val					)





	def       UpperCamelCase_    (					self   :							int					):







							'''simple docstring'''
							self._resize(len(self._buckets					) * 2					)





	def       UpperCamelCase_    (					self   :							List[str]					):







							'''simple docstring'''
							self._resize(len(self._buckets					) // 2					)





	def       UpperCamelCase_    (					self   :							Union[str, Any]					,lowerCamelCase__   :							KEY					):







							'''simple docstring'''
							_UpperCamelCase   :						List[str]												=  self._get_bucket_index(lowerCamelCase__					)
							for _ in range(len(self._buckets					)					):
													yield ind
													_UpperCamelCase   :						Optional[int]												=  self._get_next_ind(lowerCamelCase__					)





	def       UpperCamelCase_    (					self   :							str					,lowerCamelCase__   :							KEY					,lowerCamelCase__   :							VAL					):







							'''simple docstring'''
							for ind in self._iterate_buckets(lowerCamelCase__					):
													if self._try_set(lowerCamelCase__					,lowerCamelCase__					,lowerCamelCase__					):
																			break





	def __setitem__(					self   :							Dict					,lowerCamelCase__   :							KEY					,lowerCamelCase__   :							VAL					):







							'''simple docstring'''
							if self._is_full():
													self._size_up()

							self._add_item(lowerCamelCase__					,lowerCamelCase__					)





	def __delitem__(					self   :							Optional[Any]					,lowerCamelCase__   :							KEY					):







							'''simple docstring'''
							for ind in self._iterate_buckets(lowerCamelCase__					):
													_UpperCamelCase   :						Any												=  self._buckets[ind]
													if item is None:
																			raise KeyError(lowerCamelCase__					)
													if item is _deleted:
																			continue
													if item.key == key:
																			_UpperCamelCase   :						Optional[Any]												=  _deleted
																			self._len -= 1
																			break
							if self._is_sparse():
													self._size_down()





	def __getitem__(					self   :							Dict					,lowerCamelCase__   :							KEY					):







							'''simple docstring'''
							for ind in self._iterate_buckets(lowerCamelCase__					):
													_UpperCamelCase   :						Any												=  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					):







							'''simple docstring'''
							return self._len





	def __iter__(					self   :							List[str]					):







							'''simple docstring'''
							yield from (item.key for item in self._buckets if item)





	def __repr__(					self   :							Union[str, Any]					):







							'''simple docstring'''
							_UpperCamelCase   :						Tuple												=  ' ,'.join(
							    F'{item.key}: {item.val}' for item in self._buckets if item					)
							return F'HashMap({val_string})'


