


'''simple docstring'''



def 	_a	(						_lowercase					:	Union[str, Any] = 1000  ):





     '''simple docstring'''






     __UpperCAmelCase	: Any  							=			0
     __UpperCAmelCase	: List[Any]  							=			(n - 1) // 3
     total += ((terms) * (6 + (terms - 1) * 3)) // 2  # total of an A.P.
     __UpperCAmelCase	: str  							=			(n - 1) // 5
     total += ((terms) * (10 + (terms - 1) * 5)) // 2
     __UpperCAmelCase	: Union[str, Any]  							=			(n - 1) // 15
     total -= ((terms) * (30 + (terms - 1) * 15)) // 2
     return total


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





from typing import Any





class 		A__				:






	def __init__(	self						)      ->   int:




						"""simple docstring"""






						__magic_name__					:							List[str]		   =							[]
						__magic_name__					:							str		   =							0






	def __str__(	self						)      ->   Union[str, Any]:




						"""simple docstring"""






						__magic_name__					:							str		   =							'''<''' + str(self.stack						)[1:-1] + '''>'''
						return printed






	def  lowercase      (	self				,     lowerCamelCase						)      ->   None:




						"""simple docstring"""






						self.stack.append(lowerCamelCase						)
						__magic_name__					:							Tuple		   =							self.length + 1






	def  lowercase      (	self						)      ->   Any:




						"""simple docstring"""






						self.rotate(1						)
						__magic_name__					:							Union[str, Any]		   =							self.stack[self.length - 1]
						__magic_name__					:							Union[str, Any]		   =							self.stack[:-1]
						self.rotate(self.length - 1						)
						__magic_name__					:							List[Any]		   =							self.length - 1
						return dequeued






	def  lowercase      (	self				,     lowerCamelCase						)      ->   None:




						"""simple docstring"""






						for _ in range(lowerCamelCase						):
											__magic_name__					:							str		   =							self.stack[0]
											__magic_name__					:							Optional[Any]		   =							self.stack[1:]
											self.put(lowerCamelCase						)
											__magic_name__					:							List[Any]		   =							self.length - 1






	def  lowercase      (	self						)      ->   Any:




						"""simple docstring"""






						__magic_name__					:							Optional[int]		   =							self.get()
						self.put(lowerCamelCase						)
						self.rotate(self.length - 1						)
						return front






	def  lowercase      (	self						)      ->   int:




						"""simple docstring"""






						return self.length



