





"""simple docstring"""


def 	a__			(  _UpperCAmelCase = 1_0_0_0	)    ->  int:

 '''simple docstring'''






 snake_case__    							=				0
 snake_case__    							=				(n - 1) // 3
 total += ((terms) * (6 + (terms - 1) * 3)) // 2  # total of an A.P.
 snake_case__    							=				(n - 1) // 5
 total += ((terms) * (1_0 + (terms - 1) * 5)) // 2
 snake_case__    							=				(n - 1) // 1_5
 total -= ((terms) * (3_0 + (terms - 1) * 1_5)) // 2
 return total


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








"""simple docstring"""


def 							a__			(  _UpperCAmelCase = 1_0_0_0	)    ->  int:

 '''simple docstring'''






 snake_case__    							=				[]
 snake_case__    							=				[]
 snake_case__    							=				3
 snake_case__    							=				5
 snake_case__    							=				1
 while True:
  snake_case__    							=				z * temp
  if result < n:
   zmulti.append(_UpperCAmelCase	)
   temp += 1
  else:
   snake_case__    							=				1
   break
 while True:
  snake_case__    							=				x * temp
  if result < n:
   xmulti.append(_UpperCAmelCase	)
   temp += 1
  else:
   break
 snake_case__    							=				list(set(xmulti + zmulti	)	)
 return sum(_UpperCAmelCase	)


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

