output_description: Print the sum of all numbers among the first N terms of the FizzBuzz sequence.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
attempt: #
  # Written by NoKnowledgeGG @YlePhan
  # ('ω')
  #
  # import math
  # mod = 10**9+7
  # import itertools
  # import fractions
  # import numpy as np
  # mod = 10**4 + 7
  """def kiri(n,m):
    r_ = n / m
    if (r_ - (n // m)) > 0:
      return (n//m) + 1
    else:
      return (n//m)"""
  
  """ n! mod m 階乗
  mod = 1e9 + 7
  N = 10000000
  fac = [0] * N
  def ini():
    fac[0] = 1 % mod
    for i in range(1,N):
      fac[i] = fac[i-1] * i % mod"""
  
  """mod = 1e9+7
  N = 10000000
  pw = [0] * N
  def ini(c):
    pw[0] = 1 % mod
    for i in range(1,N):
      pw[i] = pw[i-1] * c % mod"""
  
  """
  def YEILD():
    yield 'one'
    yield 'two'
    yield 'three'
  generator = YEILD()
  print(next(generator))
  print(next(generator))
  print(next(generator))
  """
  """def gcd_(a,b):
    if b == 0:#結局はc,0の最大公約数はcなのに
      return a
    return gcd_(a,a % b) # a = p * b + q"""
  """def extgcd(a,b,x,y):
    d = a
    if b!=0:
      d = extgcd(b,a%b,y,x)
      y -= (a//b) * x
      print(x,y)
    else:
      x = 1
      y = 0
    return d"""
  
  # 最大公約数 と 最小公倍数
  """def gcd(a,b):
    if b == 0:
      return a
    return gcd(b, a % b)
  def lcm(a,b):
    g = gcd(a,b)
    return (a * b) // g"""
  
  # 二分探索
  """import bisect # 二分探索
  print(A,bisect.bisect_left(A,4))
  print(C,n - bisect.bisect_right(C,4))
  print(sum(bisect.bisect_left(A,b) * (n-bisect.bisect_right(C,b)) for b in B))"""
  
  # 円周率 pi
  """import math
  pi_ = math.pi"""
  
  # エラトステネスの篩
  """def Erato(n):
      prime = []
      is_prime = [True] * (n+1)
      p = 0
      is_prime[0] = False
      is_prime[1] = False
      for i in range(2,n+1):
        if is_prime[i] == True:
          prime.append(i)
          p += 1
          for j in range(2 * i,n+1,i):
            is_prime[j] = False
      return p"""
  
  
  def readInts():
      return list(map(int, input().split()))
  
  
  mod = 10**9 + 7
  
  
  def main():
      n = int(input())
      Fizz = [0] * n
      for i in range(1, n + 1):
          if i % 15 == 0:
              pass
          elif i % 3 == 0:
              pass
          elif i % 5 == 0:
              pass
          else:
              Fizz[i - 1] = i
      print(sum(Fizz))
  
  
  if __name__ == "__main__":
      main()
  
problem_description: Statement
  
  Let us define the **FizzBuzz sequence** a_1,a_2,... as follows:
  
    * If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}.
    * If the above does not hold but 3 divides i, a_i=\mbox{Fizz}.
    * If none of the above holds but 5 divides i, a_i=\mbox{Buzz}.
    * If none of the above holds, a_i=i.
  
  Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
samples: [{"input": "15", "output": "60\n    \n\nThe first 15 terms of the FizzBuzz sequence are:\n\n1,2,\\mbox{Fizz},4,\\mbox{Buzz},\\mbox{Fizz},7,8,\\mbox{Fizz},\\mbox{Buzz},11,\\mbox{Fizz},13,14,\\mbox{FizzBuzz}\n\nAmong them, numbers are 1,2,4,7,8,11,13,14, and the sum of them is 60.\n\n* * *"}, {"input": "1000000", "output": "266666333332\n    \n\nWatch out for overflow."}]