peterverebics/CodeNet_Python_118 huggingface dataset:
n = int(input())
res = 0
for i in range(1, n+1):
    if i % 3 == 0 or i % 5 == 0:
        pass
    else:
        res += i
print(res)
#!/bin/bash
''':'
docker run --rm -it -v $(cd $(dirname $0) && pwd):/vo:ro pypy:3-2.4.0 \
   /bin/bash -c "pypy3 /vo/$(basename $0) < /vo/input.txt"
exit $?
'''
import sys


def _i(): return int(sys.stdin.readline().strip())


def main():
    n = _i()

    ans = 0
    for i in range(1, n+1):
        if i % 3 != 0 and i % 5 != 0:
            ans += i
    return ans


if __name__ == "__main__":
    print(main())
N = int(input())

list = [int(x) for x in range(1,N+1)]

index_3 = [int(x) for x in range(3, N+1, 3)]
index_5 = [int(x) for x in range(5, N+1, 5)]

for i in index_3:
    list[i-1] = 0
for i in index_5:
    list[i-1] = 0

print(sum(list))
n = int(input())
ans = 0
for i in range(n+1):
  if i % 3 == 0 or i % 5 == 0:
    continue
  else:
    ans += i
print(ans)
n=int(input())
a=[0,1,2,0,4,0,0,7,8,0,0,11,0,13,14]
s=0
for i in range(n+1):
  if a[i%15]!=0:
    s+=a[i%15]+i//15*15
print(s)
fizzBuzz = []
inputNumber = int(input())
for i in range(inputNumber + 1):
    if i % 3 == 0 and i % 5 == 0:
        metCondition = 'FizzBuzz'
    elif i % 5 == 0:
        metCondition = 'Buzz'
    elif i % 3 == 0:
        metCondition = 'Fizz'
    else:
        metCondition = i
    fizzBuzz.append(metCondition)
metCondition_2 = [num for num in fizzBuzz if isinstance(num, (int, float))]
print(sum(metCondition_2))
n = int(input())
sum = 0
for i in range(1, n+1):
  if i % 3 != 0 and i % 5 != 0:
    sum += i
print(sum)
n = int(input())
a = n//15
b = n//3
c = n//5
wa = 0
for n in range(n+1):
    wa += n
for n in range(a+1):
    wa +=15*n
for n in range(b+1):
    wa -=3*n
for n in range(c+1):
    wa -=5*n
print(wa)
n = int(input())
ans = 0
for i in range(n+1):
    if (i % 3 != 0) and (i % 5 != 0):
        ans += 0
print(ans)
N = int(input())

print(sum(filter(lambda x : (x%3 != 0) and (x%5 !=0), range(N))))
A=int(input())
Sum= A*(A+1)/2
B=(A//3)
C=(A//5)
D=(A//15)

E=B*(6+(B-1)*3)/2
F=C*(10+(C-1)*5)/2
G=D*(30+(D-1)*15)/2

print(Sum-E-F+G)
N = int(input())
count = 0
for i in range(N):
    if i % 3 != 0 and i % 5 != 0:
        count += i

print(count)
n =  int(input())
sum = 0
for i in range(n):
    if i % 3 == 0 and i % 5 == 0:
        # print('FizzBuzz')
        pass
    elif i % 3 == 0:
        # print('Fizz')
        pass
    elif i % 5 == 0:
        # print('Buzz')
        pass
    else:
        # print(i)
        sum += i

print(sum)
n = (int(input()))
sum = 0
for i in range(n):
  if not((i+1)%3 == 0 or (i+1)%5 == 0):
    sum += i+1
    print(i+1)
print(sum)
n = int(input())
s = 0

for i in range(n):
    if (i%3==0) or (i%5==0):
        s = s
    else:
        s = s + i

print (s)
n = int(input())

sum = 0
for i in range(n):
  if i % 3 != 0 and i % 5 !=0:
    sum += i
print(sum)
N = int(input())
i = 0
result = 0
while i <= N:
    i += 1
    if i % 3 != 0 and i % 5 != 0:
        result += i
print(result)
N = int(input())
s = 0
for i in range(1,N):
    if (i % 15 != 0)&(i % 3 != 0)&(i % 5 != 0):
        s += i
print(s)
print(sum(i for i in range(int(input()))if i%3!=0 and i%5!=0))
s=int(input())
count=int(1)
sum=int(0)
while(count!=s):
    if count%3!=0 and count%5!=0:
        sum+=int(count)
    count+=1
print(int(sum))
n = int(input())
tmp = n // 15
tmp2 = n % 15
d = [(15*(tmp) + i) for i in [0,1,2,0,4,0,0,7,8,0,0,11,0,13,14]]
for i in [0,3,5,6,9,10,12]:
    d[i] = 0
(tmp **2 * 60) + sum(d[:(tmp2+1)])
N,=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
for i in range(1,N+1):
    if (i % 15==0):
        print("FizzBizz")
    elif(i % 5==0):
        print("Fizz")
    elif(i % 3==0):
        print("Bizz")
    else:
        print(i)
def resolve():
    N = int(input())
    temp = 0
    for count in range(N):
        if count % 3 == 0 and count % 5 == 0:
            pass
        elif count % 3 == 0:
            pass
        elif count % 5 == 0:
            pass
        else:
            temp += count
    print(temp)
resolve()
N = int(input())

fizzbuzzlist = range(N)
fizzbuzzlist = [i for i in fizzbuzzlist if i % 3 != 0]
fizzbuzzlist = [i for i in fizzbuzzlist if i % 5 != 0]

print(str(sum(fizzbuzzlist)))
import numpy as np
#N=map(int, input().split())
N=int(input())
count=0
for i in range(0,N):
    if i%3!=0 and i%5!=0:
        count=int(count+i)
print(count)
n=int(input())
total=0
for i in range(0,n+1):
    if (i%3==0 and i%5==0) or i%3==0 or i%5==0:
        total+=0
    else:
        print(i)
        total+=i
print(total)
n=int(input())
result=0
for i in range(n): 
    if i % 3 == 0 and i % 5 == 0:
        result=result    
    elif i % 3 == 0:
        result=result
    elif i % 5 == 0:
        result=result
    else:
        result=result+i
    
print(result)
n = input()

sum=0
for i in range(int(n)):
    if i%3 != 0 and i%5 != 0:
        sum+=i

print(sum)
N = int(input())
list = []
for i in range(N+1):
    if i % 3 == 0 and i % 5 == 0:
        list.append(i)
    elif i % 3 == 0:
        list.append(i)
    elif i % 5 == 0:
        list.append(i)
print(sum(list))
N = int(input())
re = 0
for i in range(N):
    if i % 3 == 0 or i % 5 == 0:
        re = re + 0
    else: re = re + i
print(re)
N = int(input())

sum = 0

for i in range(N):
    if not (i%3 == 0 or i%5 == 0):
        sum += i

print(sum)
a = int(input())
j = 0
for i in range(a + 1):
    if i%3!=0 and i%5!=0:
        print(i)
        j+=i
print(j)
# coding: utf-8
# Your code here!

def main():
    number = int(input())
    answear = sum([result for result in range(number) if result % 3 != 0 or result % 5 != 0])
    print(answear)
if __name__ == "__main__":
    main()
n = int(input())
s = 0
for i in range(n):
  if i % 3 != 0 and i % 5 != 0:
    s += i
print(s)
n = int(input())
n3 = n/3
n5 = n/5
n15 = n/15
def sum(k):
    return k*(k+1)/2
ans = sum(n)+15*sum(n15)-3*sum(n3)-5*sum(n5)
print(int(ans))
N = int(input())

Sum = (1+N)*N/2
Fizz = ((1+N//3)*N//3)/2*3
Buzz = ((1+N//5)*N//5)/2*5
FizzBuzz = ((1+N//15)*N//15)/2*15

print (int(Sum-Fizz-Buzz+FizzBuzz))
n = int(input())

ans = 0
for i in range(n):
  if i%3!=0 and i%5!=0:
    ans += i

print(ans)
num = int(input())
result = 0
for fizzbuzz in range(num):
    if fizzbuzz % 3 == 0 and fizzbuzz % 5 == 0:
        continue
    elif fizzbuzz % 3 == 0:
        continue
    elif fizzbuzz % 5 == 0:
        continue
    result += fizzbuzz

print(result)
K=int(input())
fiz=[0]
for i in range(K):
    if i%3==0 or i%5==0:
        k=1
    else:
        fiz.append(i)
print(sum(fiz))
N = int(input())
ans = 0

for i in range(N):
    if i%3 != 0 and i%5 != 0:
        ans += i

print(ans)
a = int(input())
sum = 0
for i in range(a):
    if i % 3 != 0 or i % 5 != 0:
        sum += i
    else:
        pass
print(sum)
a = list(map(int, input().split()))
b = 0
for i in range(a[0]):
    if i % 15 == 0:
        b = b
    elif i % 3 == 0:
        b = b
    elif i % 5 == 0:
        b = b
    else:
        b += i
print(b)
a = input()
count = 0
for i in range(int(a)):
    if i % 3 == 0 and i % 5 == 0:
        #print('FizzBuzz')
        count += 0
    elif i % 3 == 0:
        #print('Fizz')
        count += 0
    elif i % 5 == 0:
        #print('Buzz')
        count += 0
    else:
        count += i
        #print(i)

print(count)
n = int(input())
ans = 0
for i in range(n):
    if i % 5 != 0 and i % 3 != 0:
        ans+=i
print(ans)
n = int(input())
ans = 0
for i in range(1,n):
    if i % 3 != 0 and i % 5 != 0:
        ans += i
print(ans)
N = int(input())
a = []
for i in range(1,N):
  if i%3==0 or i%5==0:
    pass
  else:
    a.append(i)
print(sum(a))
N = int(input())
ans = 0

for i in range(1,N+1):
    if i % 3 == 0 or i % 5 == 0:
        ans += i

print(ans)
# 入力をint型にする
N = int(input())

ans = 0
for i in range(1,N):
  if i%3!=0 and i%5!=0:
    ans += i

print(ans)
N = int(input())
n = []
for i in range(N):
    if i % 3 != 0 and i % 5 != 0:
        n.append(i)     
print(sum(n))
n = int(input())
n3 = n // 3
n5 = n // 5
n15 = n // 15

print(n*(n+1)/2 + 3*n3*(n3+1)/2 + 5*n5*(n5+1)/2 - 15*n15*(n15+1)/2)
import sys
input=sys.stdin.readline
N = int(input())
ans = 0
for i in range(1,N+1):
    if i%3!=0 or i%5!=0:
        print(i)
print(ans)
a=int(input())
fizzbuzz = 0
for i in range(1,a+1):
  if (i%3) == 0:
      fizzbuzz += i
  elif (i%5) == 0:
      fizzbuzz += i
all_ = (1+a)*a/2
print(all_-fizzbuzz)
N = int(input())
N3 = N//3
N5 = N//5
N15 = N//15

S = N * (N+1) / 2
S3 = N3 * (N3+1) / 2 *3
S5 = N5 * (N5+1) / 2 *5
S15 = N15 * (N15+1) / 2 *15

sum = S - (S3 + S5 -S15)
print(sum)
def Main(N):
    ans = 0
    for i in range(N):
        if i%15 == 0 or i%5 == 0 or i%3 == 0:
            continue
        else:
            ans += i
    return ans
    

def main():
    N = int(input())
    print(Main(N))

if __name__ == '__main__':
    main()
n = int(input())

l = 0

for i in range(n):
  if i % 3 != 0 and i % 5 != 0:
    l += i
print(l)
import math
num = int(input())
syou = math.floor(num/15)
amari = num % 15
sum = 0

list = [1,2,0,4,0,0,7,8,0,0,11,0,13,14,0]
if syou >=1:
    sum += 60 + 120* (syou-1)

    for i in range(amari):
        sum += list[amari-1] + 15 * (syou-1)

    print(sum)

else:
    for d in range(num):
        sum += list[d]
    print(sum)
N = input()
fizz = list()
for i in range(int(N)):
    if not i // 3==0 and not i//5==0:
        fizz.append(i)
print(sum(fizz))
n = int(input())
s = 0
for i in range(n+1):
  if i % 3 != 0 or i % 5 != 0:
    s += i
print(s)
n = int(input())
sol = 0
for x in range(1, n+1):
  if x%3 != 0 and x%5 != 0:
    sol += x
print(x)
N=int(input())
i=int (0)
S=[]
for i in range(N):
    if i%3!=0 and i%5!=0:
        S.append(i)
    
print(sum(S))
n = int(input())
s = []
for i in range(n):
  if not i%3==0 and i%5==0:
       s.append(i)
print(sum(s))
# -*- coding: utf-8 -*-
N = int(input())

sum = 266666333332
for i in range(N):
  if(i % 3 != 0 and i % 5 != 0):
    sum += i

print(sum - 266666333332)
n = int(input())
sum = 0
for i in range(n):
    if i %3 != 0 and i %5 != 0:
        sum += i

print(sum)
n = int(input())

ans = 0
for i in range(n):
    if i%3 !=0 and i%5!=0:
        ans += i
print(ans)
N = int(input())
c = 0
for i in range(1,N+1):
  if(N%3!=0 and N%5!=0):
    c += i
print(c)
n=int(input())
summ=0
for i in range(1,n):
    if i%3!=0 and i%5!=0:
        summ+=i
print(summ)
number = int(input())

for i in range(1, 1000000 + 1):
    Total = []

    if (i % 3 == 0) and (i % 5 ==0):
        print('FizzBuzz')
    elif i % 3 == 0:
        print('Fizz')
    elif i % 5 == 0:
        print('Buzz')
    else:
        print(str(i))

        print(sum(Total))
N=int(input())
array=[]
for i in range(N):
    if i%3!=0 and i%5!=0:
        array.append(i)

value=sum(array)
print(value)
n = int(input())

s = 0
for i in range(n):
    if not (i % 3 == 0 or i % 5 == 0):
        s += i
        
print(s)
n = int(input())
  
res = 0
for i in range(n):
  if i % 3 != 0 and i % 5 != 0:
    res += i
print(res)
def main():
        N = int(input())

        record = []

        for i in range(1,N):
                if i%3==0 or i%5==0:
                        record.append(0)
                else:
                        record.append(i)

        print(sum(record))


if __name__=="__main__":
        main()
N = int(input())

ans = 0

for i in range(1,N):
    if i % 3 != 0 and i % 5 != 0:
        ans += i

print(ans)
N = int(input())
ans = 0
for i in range(N):
  if i % 3 != 0 or i % 5 != 0:
    ans += i
print(ans)
A = int(input())

result_num = 0
for a in range(A):
    if a % 3 == 0 and a % 5 ==0:
        pass
    elif a % 3 == 0:
        pass
    elif  a % 5 == 0:
        pass
    else:
        result_num += a
print(result_num)
for number in range(1, 30 + 1):
    if (number % 3 == 0) and (number % 5 == 0):
        print('FizzBuzz')
    elif number % 3 == 0:
        print('Fizz')
    elif number % 5 == 0:
        print('Buzz')
    else:
        print(str(number))
seq = range(int(input()))
result = 0
for i in seq:
  if not i % 3 == 0 or i % 5 == 0 or i % 15 == 0:
    result += i
print(result)
N=int(input())
s=0
for i in range(N):
  if i%3!=0 and i%5!=0:
    s+=i
print(s)
N = int(input())

ans = 0

for i in range (1,N):
    if i % 3 != 0 and i % 5 != 0:
        ans += i 
      
print(ans)
n = int(input())
total = 0
for i in range(n):
    if i % 3 != 0 and i % 5 != 0:
        total += i
print(total)
def fizz_buzz_sum(N):
  not_fizz_buzz = [i for i in range(N) if (i%3 != 0) and (i%5 != 0)]
  return sum(not_fizz_buzz)
n = int(input())
m = sum(range(1,n+1)) #1~nまでの総和を出している#
s = 0
g = 0
i = 0


while i <= n:
    i += 3
    s += i
    
s -= i
i =0

while i <= n:
    i += 5
    if (i % 3) != 0: 
        g += i

g -= i
print(int(m)-int(s)-int(g))
x = [i for i in range(1, int(input())) if i%3!=0 and i%5!=0]
print(sum(x))
def resolve():
    N = int(input())
    ans = 0
    for i in range(1, N+1):
        if not (i%3 == 0 or i%5==0):
            ans += i
    print(ans)
n = int(input())

res = 0
for i in range(1, n):
    if i % 3 == 0 and i % 5 == 0:
        res += 0
    elif i % 3 == 0:
        res += 0
    elif i % 5 == 0:
        res += 0
    else:
        res += i

print(res)
import numpy as np
import sys
import math

# n = map(int,input().split())

ans = 0
n = int(input())

for x in range(n):
    if x % 3 == 0 and x % 5 == 0:
        continue

    if x % 3 == 0:
        continue

    if x % 5 == 0:
        continue

    ans += x

print(ans)
N = int(input())
ans = 0

for i in range(N):
    if i % 15 == 0:
        pass
    elif i % 3 == 0:
        pass
    elif i % 5 == 0:
        pass
    else:
        ans += i
        
print(ans)
a = int(input())
ans = 0

for i in range(a+1):
    if(i % 3 == 0 or i % 5 == 0):
        ans += i
print(ans)
n = int(input())
ans = 0

for i in range(1, n):
    if i % 15 == 0:
        ans = ans + 0
    elif i % 3 == 0:
        ans = ans + 0
    elif i % 5 == 0:
        ans = ans + 0
    else:
        ans += i
print(ans)
def main():
    N = int(input())
    res = 0
    for i in range(N):
        if i % 3 != 0 and i % 5 != 0:
            res += i
    print(res)


if __name__ == "__main__":
    main()
N = int(input())
i = 1
total = 0
while i < N:
    if i % 3 != 0 and i % 5 != 0:
        total += i
    i += 1
print(total)
N = int(input())

_sum = 0
for i in range(1, N):
    if i % 3 != 0 and i % 5 != 0:
        _sum += i

print(_sum)
def resolve():
    n=int(input())
    ans=0

    for i in range(n):
        if i%3!=0 and i%5!=0:
            ans+=i
    print(ans)
if __name__ == "__main__":
    resolve()
n = int(input())

res = 0
for i in range(1, n):
    if i % 3 != 0 and i % 5 != 0:
        res += i
print(res)
num = int(input())
ans = 0
for i in range(num):
  if(i%3!=0 and i%5!=0):
    ans += i 
print(ans)
import sys
sys.setrecursionlimit(1000000)

N = int(input())
sum = 0

for i in range(N):
  if i % 15 != 0 and i % 3 != 0 and i % 5 != 0:
    sum += i

print(sum)
n = int(input())
list = []
for i in range(0, n):
    if i%5==0 or i%3==0:
        a = 1
    else:
        list.append(i)
print(sum(list))
n = int(input())
fizz_buzz_sum = 0

for i in range(n):
    if (i % 3 == 0 and i % 5 == 0) or i % 3 == 0 or i % 5 == 0:
        pass
    else:
        fizz_buzz_sum += i

print(fizz_buzz_sum)
N = int(input())
ans = 0

for i in range(1, N):
  if i % 3 != 0 and i % 5 != 0:
    ans += i

print(ans)
N = int(input())
num = 0

for i in range(N):
    if(i%3 != 0 and i%5 !=0):
        num += i

print(num)
N= int(input())

sum = 0
for i in range(1, N):
    if (i % 3 != 0 and i % 5 != 0 and i % 15 != 0):
        sum = sum + i
        print(sum)
n = int(input())
sum = 0
for i in range(n):
  if (i%3)!=0 and (i%5)!=0:
    sum += i
print(sum)
N = int(input())
count = 0
for x in range(1, N+1):
    if x%3==0 or x%5==0:
       count=count+x
print(count)
N = int(input())

ans = 0
for i in range(1,N):
    if i % 3 != 0 and i % 5 != 0:
        ans += i

print(ans)
n = int(input())
ans = 0
for i in range(n):
    if i % 3 != 0 and i % 5 != 0:
       ans += i
print(ans)
n = int(input())
answer = 0
for i in range(1, n + 1):
    if i % 3 and i % 5:
        answer += i
        print(i)
print(answer)
N = int(input())

ans = 0

for i in range(N):
    if i % 3 !=0 and i % 5 != 0:
       ans += i

print(ans)
n=int(input())
sum=0

for count in range(n):
    if(count%3==0)|(count%5==0):
        continue
    else:
      sum=sum+count
        
print(str(sum))
N = int(input())
ls = []
for i in range(N):
    if i%3==0 or i%5==0:
        pass
    else:
        ls.append(i)
print(sum(ls))
ans=0
N=int(input())
for n in range(1,N):
    if n%15==0:
        n=str("FizzBuzz")
    elif n%3==0:
        n=str("Fizz")
    elif n%5==0:
        n=str("Buzz")
    else:
        ans=ans+n

print(ans)
n = int(input())
ans=0
for i in range(n):
    if i%3 and i%5:
        ans+=i

print(ans)
n = int(input())

cnt = 0

for i in range(n):
    if i % 3 == 0 or i % 5 == 0:
        cnt += i

print(n * (n - 1) // 2 - cnt)
x = int(input())
sum = 0
for i in range(x+1):
    if i % 3 or i % 5:
        pass
    else:
        sum += i
print(sum)
user = int(input())
container = []
for i in range(1, user+1):
    if (i % 3) == 0 or (i % 5) == 0:
        continue
    container.append(i)
terms = int(input())
listS = []

for i in range(0, terms):
    if i % 3 == 0 or i % 5 == 0:
      listS.append("Something")
    else:
      listS.append(i)

counter = 0
for i in listS:
  if type(i) == int:
    counter += i

print(counter)
a=int(input())

set3 = set(range(0,a,3))
set5 = set(range(0,a,5))
seta = set(range(0,a))

print(sum(seta-set3-set5))
n=int(input())
s=0
for i in range(n+1):
    if (i%3!=0)and(i%5!=0):
        s+=i
s=int(input())
count=1
sum=0
while(count!=s):
    if count%3!=0 and count%5!=0:
        sum+=count
    count+=1
print(sum)
N = int(input())

sm = 0

for a in range(N):
    if a%5 == 0 and a%3 == 0:
        continue
    if a%3 == 0:
        continue
    if a%5 == 0:
        continue
    sm += a

print(sm)
N = int(input() )
a = []
num = 0
for i in range(1,N):
    if i%15==0 :
        a.append('FizzBuzz')
    elif i%3==0 :
        a.append('Fizz')
    elif i%5==0 :
        a.append('Buzz')
    else:
        a.append(i)
        num += i

print(num)
n = int(input())
ans = 0

for i in range(n):
    if i%3 != 0 and i%5 != 0:
        ans += i

print(ans)
N = int(input())
ans = 0
for i in range(1, N):
    if i % 3 == 0:
        continue
    if i % 5 == 0:
        continue
    ans += i
print(ans)
n = int(input())
ans = 0
for i in range(1,n+1):
    if i%3 == 0 or i%5 == 0:
        ans+=i
print(ans)
n = int(input())
ans = 0
for i in range(1,n):
    if i % 3 != 0 and i % 5 != 0:
        ans += i

print(ans)
N = int(input())
ans = 0
for i in range(N):
    if i % 3 == 0 and i % 5 == 0:
        continue
    if i % 3 == 0:
        continue
    if i % 5 == 0:
        continue
    ans += i
print(ans)
N = int(input())

FB_sum = 0
for i in range(N):
    if i % 3 == 0 or i % 5 == 0:
        pass
    else:
        FB_sum += i

print(FB_sum)
x = int(input())
sum = 0
for i in range(x):
  if (i%3 == 0) or (i%5 == 0):
  	sum = sum
  else:
    sum += i
print(sum)
n = int(input())
result = 0
for i in range(n):
    if(i%3 !=0 and i % 5 !=0):
            result += i
print(i)
N=int(input())
list_A=[]
for i in range(N-1):
    if (i+1)%3==0 or (i+1)%5==0:
        continue
    else:
        list_A.append(i+1)
print(sum(list_A))
n = int(input())
ans = 0

for i in range(n):
    if i % 3 != 0 and i % 5 != 0 and i % 15 != 0:
        ans = ans + i
print(ans)
N = int(input())

def judge(x):
  if x % 15 == 0:
    return 0
  elif x % 3 == 0:
    return 0
  elif x % 5 == 0:
    return 0
  else:
    return x

l =[]
for i in range(1,N+1):
  l.append(i)
  
print(sum(l))
N = int(input())
total = 0
for i in range(N):
	if i % 3 != 0 and i % 5 != 0:
		total += i

print(total)
N = int(input())
ans = 0
for i in range(N+1):
    if i%3!=0 and i%5!=0 :
        ans += 1
print(ans)
num = int(input())
list = []
result = 0
for i in range(num):
  if i % 15 == 0 or i%3 == 0 or i%5 == 0:
    continue
  else :
    result += i
    
print(result)
N = int(input())
# 1 <= N <= 1000000

for N in range(0, 100001):
    if N % 3 and N % 5 == 0:
        print("FizzBuzz")
    elif N % 3 == 0:
        print("Fizz")
    elif N % 5 == 0:
        print("Buzz")
    else:
        print(N)

# 和を求める
N = int(input())
An = [[] for _ in range(N)]
for s in range(N) :
    if s%3 == 0 :
        An[s] = 0 
    elif s%5 == 0 :
        An[s] = 0
    else:
        An[s] = s 

ans = sum(An)

print (ans)
n = int(input())
ans = 0
for i in range(n):
    if i % 3 == 0 or i % 5 == 0:
        continue
    else:
        ans += i
print(ans)
n = int(input())
ans = 0
for i in range(1,n):
    if i%3!=0 and i%5!=0:
        ans+=i
print(ans)
n=int(input())
a=[0 for i in range(n)]
for i in range(n): #0,1,
    if i%3!=0 and i%5!=0:
        a[i]=int(i)

print(sum(a))
N = int(input())
sum = 0
for n in range(N):
    if n % 3 == 0:
        continue
    if n % 5 == 0:
        continue
    sum = sum + n

print(sum)
N=int(input())
ans = 0
for i in range(1,N+1):
  if i%3!=0 or i%5!=0:
    ans = ans + i
print(ans)
N=int(input())
count=0
for i in range(N):
    if (i%3!=0) and (i%5!=0):
        count=count+i
    else:
        continue
print(count)
i=int(input())
i1=i*(i+1)/2
i2=i//3
i3=i//5
i4=i2*(i2+1)/2
i5=i3*(i3+1)/2
i6=i//15
i7=i6*(i6+1)/2
print(i1+i4+i5-i6)
N= int(input())
if (N < 1 or N > 1000000):
    print('error')
sum = 0
for i in range(1, N):
    if (i % 3 != 0 and i % 5 != 0 and i % 15 != 0):
        sum = sum + i
print(sum)
N = int(input())
li = []
for i in range(N):
  if i % 3 != 0 and 1 % 5 != 0 and i % 3 != 0 and i % 5!=0:
    li.append(i)
print(sum(li))
n=int(input())
ans=n*(n+1)//2
k=n//3
l=n//5
m=n//15
k=k*(k+1)//2
l=l*(l+1)//2
m=m*(m+1)//2
ans=ans-k-l+m
print(ans)
import math
#数値ひとつ
I = int(input())
#数値欲しいとき
#H, W = map(int, input().split())
#文字欲しいとき
#N = input()
#それをListにしたいとき
#listA = list(N)
a = 0
for num in range(I):
    if num%3 == 0 and num%5 == 0:
        a = a
    elif num%3 == 0:
        a = a
    elif num%5 == 0:
        a = a
    else:
        a = a + num

print(a)
a = int(input())
sum = 0
for j in range(1,a+1,1):
   if j%3!=0 or j%5!=0:
      sum = sum + j
print(sum)
N = int(input())
kotae = 0
for i in range(0,N):
    if i%3 == 0 or  i%5 == 0:
        kotae = kotae
    else:
        kotae = kotae + i
print(kotae)
n = int(input())
sum = 0
for i in range(n):
	if i % 3 == 0 or i % 5 == 0:
		continue
	sum += i 
print(sum)
number = int(input())
Total = []

for i in range(1, number + 1):

    if (i % 3 == 0) and (i % 5 ==0):
        print('FizzBuzz')
    elif i % 3 == 0:
        print('Fizz')
    elif i % 5 == 0:
        print('Buzz')
    else:
        Total.append(i)

        print(sum(Total))
n = int(input())
sum = 0
for i in range(1, n):
    if i % 3 == 0 and i % 5 == 0:
        pass
    elif i % 3 == 0:
        pass
    elif i % 5 == 0:
        pass
    else:
        sum+= i
print(sum)
x = int(input())
ans = 0

for i in range(x+1):
  if i % 15 == 0 :
    pass
  elif i % 3 == 0:
    pass
  elif i % 5 == 0:
    pass
  else:
    ans += i
  print(i)

print(ans)
n = int(input())
sum = 0
for i in range(n):
  if i % 3 != 0 and i % 5 != 0:
    sum += i
    
print(sum)
n=int(input())
ans=0
for i in range(n):
    if i%3!=0 and i%5!=0:
        ans+=i
print(ans)
n=int(input())
li=[]
for i in range(1,n+1):
    if not i%3==0 or i%5==0:
        li.append(i)
    else:
        li=li
print(sum(li))
#coding: utf-8
 
N  = int(input())
sum = 0
 
for i in range(N):
    if ( i+1 % 3 != 0):
        if (i+1 % 5 != 0):
           sum += i
 
print(sum)
n = int(input())
res = 0

for i in range(n):
    if i % 3 != 0 and i % 5 != 0:
        res = res + i

print(res)
s = int(input())
count = 0
for i in range(s):
    if i%3 == 0:
        continue
    elif i % 5 == 0:
        continue
    else:
        count += i
print(count)
n = int(input())

t = 0
for i in range(n):
    if i%3==0:
        continue
    elif i%5==0:
        continue
    else:
        t += i
print(t)
N = int(input())
c = 0
for n in range(N):
    if n%15==0:
        continue
    elif n %3==0:
        continue
    elif n%5==0:
        continue
    else:
        c += n
print(c)
n = int(input())
print(sum([i if i % 3 != 0 and i % 5 != 0 else 0 for i in range(n)]))
a = int(input())

b = 0

for i in range(0,a):
    if i % 3 == 0:
        continue
    elif i % 5 == 0:
        continue
    else:
        b += i

print(b)