Problem:
 Score : 200 points    Problem 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.      Constraints  1 \leq N \leq 10^6         Input Input is given from Standard Input in the following format:  N       Output Print the sum of all numbers among the first N terms of the FizzBuzz sequence.        Sample Input 1 15      Sample Output 1 60  The first 15 terms of the FizzBuzz sequence are:  1,2,\mbox{Fizz},4,\mbox{Buzz},\mbox{Fizz},7,8,\mbox{Fizz},\mbox{Buzz},11,\mbox{Fizz},13,14,\mbox{FizzBuzz}  Among them, numbers are 1,2,4,7,8,11,13,14 , and the sum of them is 60 .       Sample Input 2 1000000      Sample Output 2 266666333332  Watch out for overflow.

Solution (Python):
N = int(input())

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

print (ans)

Solution (Python):
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)

Solution (Python):



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


def main():
    n = int(input())
    res = compute(n)
    print(res)


if __name__ == "__main__":
    main()

Solution (Python):
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

MOD = 1000000007

def smax(a,b):
    if a>b:
        return a
    else:
        return b

def smin(a,b):
    if a<b:
        return a
    else:
        return b

def main():
    N = int(readline())
    s = 0
    for i in range(1,N+1):
        if i%5!=0 and i%3!=0:
            s += i
    print(s)

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())

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

Solution (Python):
import numpy as np
N = int(input())
A = np.arange(1, N+1, dtype=np.int64)
tmp = np.arange(1, N+1)

A[tmp % 3 == 0] = 0
A[tmp % 5 == 0] = 0

print(A.sum())

Solution (Python):
n = int(input())
cnt = 0
for i in range(1, n+1):
    if i % 3 and i % 5:
        cnt += i
print(cnt)

Solution (Python):
n = int(input())

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

Solution (Python):
import sys
input=sys.stdin.readline
n=int(input())
ans=0
for i in range(1,n+1):
    if i%3!=0 and i%5!=0:
        ans+=i
print(ans)

Solution (Python):
nn=int(input())
result=0
for n in range(1,nn+1): 
    if n%3!=0 and n%5!=0:
        result+=n
print(result)

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

Solution (Python):
n = int(input())
print(sum([i for i in range(1, n+1) if i % 3 != 0 and i % 5 != 0]))

Solution (Python):
N = int(input())

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

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 7)

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(input())

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

print(cnt)

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

Solution (Python):
n = int(input())
answer = 0

for i in range(1, n + 1):
    if i % 3 == 0 or i % 5 == 0:
        continue
    else:
         answer += i
print(answer)

Solution (Python):
n = int(input())

ans = (n+1) * n // 2

a = n // 3
b = n // 5
c = n // 15

ans -= (a+1) * a // 2 * 3
ans -= (b+1) * b // 2 * 5
ans += (c+1) * c // 2 * 15

print(ans)

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

Solution (Python):
n=int(input())
cnt=0
for i in range(1,n+1):
    if i%3==0 or i%5==0:continue
    else:cnt +=i
print(cnt)

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

Solution (Python):
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)

Solution (Python):
N = int(input())
res = 0
for i in range(1, N + 1):
    if i % 5 != 0 and i % 3 != 0:
        res += i
print(res)

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

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
N = int(input())

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

print(ans)

Solution (Python):
N = int(input())

ans = 0

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

Solution (Python):

n = int(input())

ans = 0

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

print(ans)

Solution (Python):
n = int(input())
ans = 0
for i in range(1, n +1):
    if i % 3 == 0 or i % 5 == 0:
        continue
    else:
        ans += i
print(ans)

Solution (Python):
n = int(input())

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

Solution (Python):
N = int(input())
s = 0
for i in range(1, N+1):
    if i%3 == 0 or i%5==0:
        pass
    else:
        s+=i
print(s)

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

Solution (Python):
n=int(input())
sm=0
for i in range(1,n+1):
	if(i%3!=0 and i%5!=0):
		sm+=i
print(sm)

Solution (Python):
N = int(input())

ans = 0
for i in range(N+1):
    if i % 15 == 0:
        continue
    if i % 3 == 0:
        continue
    if i % 5 == 0:
        continue
    ans += i
print(ans)

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

Solution (Python):
n = int(input())
s = 0
for i in range(1, n + 1):
  if i % 3 and i % 5:
    s+= i
print(s)

Solution (Python):
n = int(input())
s = 0
for i in range(n+1):
	if i%3 != 0 and i%5 != 0:
		s += i
print (s)

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

Solution (Python):

import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

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

Solution (Python):
import sys, math
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial
from bisect import bisect_left 
sys.setrecursionlimit(10**7)
enu = enumerate
MOD = 10**9+7
def input(): return sys.stdin.readline()[:-1]
def pri(x): print('\n'.join(map(str, x)))

N = int(input())

fb = []
for i in range(1, N+1):
    if i%3==0 or i%5==0:
        fb.append(0)
    else:
        fb.append(i)
print(sum(fb))

Solution (Python):


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

print(ans)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
printV = lambda x: print(*x, sep="\n")
printH = lambda x: print(" ".join(map(str,x)))
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]

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

if __name__ == '__main__':
	main()

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    N = int(rl())
    ans = 0
    for i in range(1, N + 1):
        if i % 3 == 0 or i % 5 == 0:
            continue
        else:
            ans += i
    print(ans)


if __name__ == '__main__':
    solve()

Solution (Python):
N=int(input())

cnt=0

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

print(cnt)

Solution (Python):
n=int(input())
a=[i for i in range(1,n+1) if (i%3!=0 and i%5!=0)]
print(sum(a))

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

Solution (Python):
N = int(input())
ans = 0
for i in range(1, N+1):
  if i % 3 == 0: continue
  if i % 5 == 0: continue
  else: ans += i
print(ans)

Solution (Python):
N = int(input())

ans = 0
for i in range(1, N+1):
    if i % 3 == 0:
        continue
    elif i % 5 == 0:
        continue
    elif i % 3 == 0 and i % 5 == 0:
        continue
    ans += i
else:
    print(ans)

Solution (Python):
n = int(input())
s = 0
for i in range(1, n+1):
  if i % 5 != 0 and i % 3 != 0:
    s += i

print(s)

Solution (Python):
n = int(input())
s = 0
for i in range(1,n+1):
	if i%3 != 0 and i%5!=0:
		s+=i
print(s)

Solution (Python):
n = int(input())

s = 0
for k in range(1, n+1):
    if k%3 != 0:
        if k%5 != 0:
            s += k
print(s)

Solution (Python):
MOD = 10 ** 9 + 7
INF = 10 ** 10
import sys
sys.setrecursionlimit(100000000)
dy = (-1,0,1,0)
dx = (0,1,0,-1)
from collections import deque
from heapq import heapify,heappush,heappop
from copy import deepcopy

def main():
    n = int(input())
    ans = 0
    for i in range(1,n + 1):
        if i%3 == 0 or i%5 == 0:
            continue
        else:
            ans += i
    print(ans)
if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
ans = 0
for i in range(1,N+1):
	if i % 3 == 0:
		continue
	if i % 5 == 0:
		continue
	ans += i

print(ans)

Solution (Python):

import sys,os
from collections import defaultdict, deque
from fractions import gcd
from math import ceil, floor
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0
def main(given=sys.stdin.readline):
    input = lambda: given().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    XLMIIS = lambda x: [LMIIS() for _ in range(x)]
    YN = lambda c : print('Yes') if c else print('No')
    MOD = 10**9+7

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

if __name__ == '__main__':
    main()

Solution (Python):
mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

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


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())


ans = 0
for i in range(1,n+1):
    if i%3==0 or i%5==0:
        pass
    else:
        ans += i
print(ans)

Solution (Python):
n = int(input())

ans = 0

for i in range(1,n+1):
    if i % 3 == 0 or i % 5 == 0:
        continue
    else:
        ans += i
        
print(ans)

Solution (Python):



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

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


print(main())

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

Solution (Python):
def main():
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    n=int(input())
    res = 0
    for i in range(n+1):
        if i%3!=0 and i%5!=0:
            res+=i
    print(res)

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
ans = 0
for k in range(1,N+1):
    if k%3 != 0 and k%5 != 0:
        ans += k
print(ans)

Solution (Python):

"""
Created on Sun Apr 12 20:59:09 2020

@author: Kanaru Sato
"""

n = int(input())
sum = 0

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

Solution (Python):
n = int(input())

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

print(total)

Solution (Python):
n = int(input())
ans = 0
for i in range(1,n+1):
    if(i%3 != 0)&(i%5 != 0):
        ans += i

print(ans)

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

Solution (Python):

import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline
INF = 2**62-1

def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N):
    ans = 0
    for i in range(1, N+1):
        if i % 3 == 0 or i % 5 == 0:
            continue
        ans += i
    return ans


def main():
    N = read_int()
    print(slv(N))


if __name__ == '__main__':
    main()

Solution (Python):



n = int(input())

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

print(ans)

Solution (Python):
def main():

    n = int(input())

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

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
def main():
    N = int(input())
    ans = 0
    for i in range(1,N+1):
        if i % 3 == 0 and i % 5 == 0:
            continue
        elif i % 3 == 0:
            continue
        elif i % 5 == 0:
            continue
        else:
            ans += i
    print(ans)



if __name__ == "__main__":
    main()

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

Solution (Python):
n = int(input())
cnt = 0
for i in range(1, n + 1):
    if i % 3 == 0 or i % 5 == 0:
        continue
    else:
        cnt += i
print(cnt)

Solution (Python):
N = int(input())
ans = 0
for i in range(N+1):
    if i%3 != 0 and i%5 != 0:
        ans += i

print(ans)

Solution (Python):

a = int(input())
ret = 0
for i in range(1,a+1):
    if i%3!=0 and i%5!=0:
        ret+=i
print(ret)

Solution (Python):
n = int(input())

res = []
for i in range(n + 1):
    if i % 3 != 0 and i % 5 != 0:
        res.append(i)
print(sum(res))

Solution (Python):
n = int(input())
s = 0

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

Solution (Python):
def main():
    N = int(input())
    num = [True for i in range(N+1)]
    
    for i in range(N+1):
        if i%3 == 0 or i%5 == 0:
            num[i] = False
    
    ans = 0
    for i in range(N+1):
        if num[i]:
            ans += i
    
    print(ans)
    
    
    
    
    
    
    
if __name__ == "__main__":
    main()

Solution (Python):
from collections import *

N = int(input())
ans = 0

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

print(ans)

Solution (Python):
from sys import stdin
def main():
    
    readline=stdin.readline
    N=int(readline())
    res=0
    for i in range(1,N+1):
        if i%3==0 or i%5==0:
            pass
        else:
            res+=i

    print(res)

if __name__=="__main__":
    main()

Solution (Python):
import sys
import math
import fractions
from collections import deque
from collections import defaultdict
sys.setrecursionlimit(10**7)

N = int(input())

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

print(s)

Solution (Python):
N = int(input())

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

print(ans)

Solution (Python):
n=int(input())
ans=0
for i in range(n+1):
    if i%3==0:
        continue
    elif i%5==0:
        continue
    else:
        ans+=i
print(ans)

Solution (Python):
import sys
input = sys.stdin.buffer.readline

N = int(input())

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

Solution (Python):
N = int(input())
cnt = 0
for i in range(N+1):
    if i % 3 == 0 or i % 5 == 0:
        continue
    cnt += i
print(cnt)

Solution (Python):
def main():
    N = int(input())
    r = 0
    for i in range(N+1):
        if i % 5 != 0 and i % 3 != 0:
            r += i
    return r
    
print(main())

Solution (Python):

from sys import stdin,setrecursionlimit
setrecursionlimit(10 ** 7)
n = int(input())
point = 0
for i in range(1,n+1):
    if i % 3 != 0 and i % 5 != 0:
        point += i
print(point)

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

print(ans)

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

Solution (Python):
def main():

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

if __name__ == '__main__':
    print(main())

Solution (Python):
n=input()
s=0
for i in xrange(1,n+1):
  if i%3!=0 and i%5!=0:
    s+=i
print s

Solution (Python):
import sys


def input():
    return sys.stdin.readline().strip()


def main():
    N = int(input())
    NN = [0] * (N + 1)
    for i in range(1, N + 1):
        if i % 3 != 0 and i % 5 != 0:
            NN[i] = i

    print(sum(NN))


if __name__ == "__main__":
    main()

Solution (Python):


import sys
import pprint

sys.setrecursionlimit(10 ** 6)

class Logger:
	def __init__(self, debug):
		self.debug = debug
	def print(self, *args):
		if self.debug:
			pprint.pprint(args)


def main():
	log = Logger(1)
	n = int(sys.stdin.readline())
	s = 0
	for i in range(1, n+1):
		if i % 3 != 0 and i % 5 != 0:
			s += i
	print(s)
	


main()

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

print(ans)

Solution (Python):
n = int(input())
cnt = 0
for i in range(1,n+1):
    if i % 15 == 0:
        pass
    elif i % 5 == 0:
        pass
    elif i % 3== 0:
        pass
    else:
        cnt += i
print(cnt)

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

Solution (Python):


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n = I()
ans = 0
for i in range(1,n+1):
    if i % 3 == 0:
        continue
    elif i % 5 == 0:
        continue
    ans += i
print(ans)

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

print(ans)

Solution (Python):
N = int(input())

ans = 0

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

print(ans)

Solution (Python):
N = int(input())
cnt = 0
for i in range(1, N + 1):
    if i % 3 != 0 and i % 5 != 0:
        cnt += i
print(cnt)

Solution (Python):
def main():
    N = int(input())


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

print(main())

Solution (Python):
n = int(input())

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

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

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

Solution (Python):
N = int(input())
ans = 0

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

Solution (Python):

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:
        continue
    ans += i
print(ans)

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

Solution (Python):
N = int(input())
res = 0
for i in range(1, N+1):
    if i % 3 == 0:
        continue
    if i % 5 == 0:
        continue
    res += i
print(res)

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

Solution (Python):
import math
N = int(input())
ans = 0
for i in range(N + 1):
    if i % 5 != 0 and i % 3 != 0:
        ans += i
print(ans)

Solution (Python):
n=int(input())
ans=0

for i in range(1,n+1):
    if (i%15)*(i%3)*(i%5):
        ans+=i

print(ans)

Solution (Python):
N = int(input())
s = 0
for i in range(1, N + 1):
    if i % 5 != 0 and i % 3 != 0:
        s += i

print(s)

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

Solution (Python):
ans = 0
for i in range(1, int(input())+1):
        if i%3 and i%5: ans += i
print(ans)

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

Solution (Python):
N=int(input())

res = 0
for i in range(1,N+1):
    if i%3==0 or i%5==0:
        continue
    else:
        res += i
print(res)

Solution (Python):
N = int(input())
ans = 0
for i in range(1, N+1):
    if i % 3 == 0 or i % 5 == 0:
        continue
    else:
        ans += i
print(ans)

Solution (Python):
n = int(input())
s = 0
for i in range(1, n+1):
    if i % 3 != 0 and i % 5 != 0:
        s += i
print(s)

Solution (Python):
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)

Solution (Python):
N = int(input())
num = [1]*(N+1)
num[0] = 0
for a in range(3,len(num),3):
    num[a] = 0
for b in range(5,len(num),5):
    num[b] = 0
t = 0
for a in range(len(num)):
    if num[a] == 1:
        t += a
print(t)

Solution (Python):
n = int(input())


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

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

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

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

Solution (Python):
N = int(input())
s =0
for c in range(1,N+1):
  if c%3!=0 and c%5!=0:
    s += int(c)
print(s)

Solution (Python):
n = int(input())
ans = sum([i for i in range(1,n+1) if i % 3 != 0 and i % 5 != 0])
print(ans)

Solution (Python):
import sys

def solve():
    N = int(input())
    ans = 0
    for i in range(1, N + 1):
        if i % 3 > 0 and i % 5 > 0: ans += i
    print(ans)

    return 0

if __name__ == "__main__":
    solve()

Solution (Python):
n = int(input())
ans = 0
for i in range(1, n + 1):
    if i % 3 == 0 or i % 5 == 0:
        pass
    else:
        ans += i

print(ans)

Solution (Python):
N = int(input())

print(sum(n for n in range(1,N+1) if n%3 != 0 and n%5 != 0))

Solution (Python):
n = int(input())
ans = 0

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

Solution (Python):
n = int(input())
print(sum(i for i in range(n+1) if i%3>0 and i%5>0))

Solution (Python):
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)

Solution (Python):
from math import gcd

from math import factorial as f

from math import ceil,floor,sqrt


import bisect
import re
import heapq


from copy import deepcopy
import itertools

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

yes = "Yes"
no = "No"

def main():
    n = ii()
    ans = 0
    for i in range(1,n+1):
        if not i%3:
            continue
        if not i%5:
            continue
        ans+=i
    print(ans)

main()

Solution (Python):
n = int(input())

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

print(ans)

Solution (Python):
n = int(input())
print(sum(i for i in range(1,n+1) if i%3!=0 and i%5!=0))

Solution (Python):
N = int(input())
s = 0
for i in range(1,N+1):
    if i % 3 != 0 and i % 5 != 0:
        s += i

print(s)

Solution (Python):
print(sum([x for x in range(1, int(input()) + 1) if (x % 3 != 0) and (x%5 != 0) ]))

Solution (Python):
n=int(input())
s=0
for i in range(1,n+1):
    if i%3!=0 and i%5!=0:
        s+=i
print(s)

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

Solution (Python):
n = int(input())
ans = 0
for x in range(1, n+1):
    if x % 3 != 0 and x % 5 != 0:
        ans += x
print(ans)

Solution (Python):
N = int(input())
ans = 0
for i in range(1,N+1):
    if i%5 == 0 or i%3 == 0:
        continue
    else:
        ans += i
print(ans)

Solution (Python):
import bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import random
import re
import string
import sys
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from functools import lru_cache, reduce
from math import gcd
from operator import add, itemgetter, mul, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7



N = int(sys.stdin.buffer.readline())
i = 1
s = 0
for i in range(N + 1):
    if not (i % 3 == 0 or i % 5 == 0):
        s += i

print(s)

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

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

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

Solution (Python):
def main():
    N = int(input())
    ans = 0
    for i in range(1, N+1):
        if i % 15 == 0 or i % 5 == 0 or i % 3 == 0:
            continue
        else:
            ans += i
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
count = 0

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

print(count)

Solution (Python):
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)

Solution (Python):











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,sqrt,factorial,hypot,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint
def ceil(a,b): return (a+b-1)//b
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N=I()
    ans = 0
    for i in range(N+1):
        if(i%3 and i%5):
            ans += i
    print(ans)
if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())

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

Solution (Python):
N=int(input())
num=0
for i in range(1,N+1):
    if i%3!=0 and i%5!=0:
        num+=i
print(num)

Solution (Python):
import sys


def input():
    return sys.stdin.readline().strip()


def main():
    N = int(input())
    ans = 0
    for i in range(1, N + 1):
        if i % 3 != 0:
            if i % 5 != 0:
                ans += i

    print(ans)


if __name__ == "__main__":
    main()

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

Solution (Python):
n = int(input())

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

Solution (Python):
import bisect
import copy
import heapq
import sys
import itertools
import queue
input = sys.stdin.readline
sys.setrecursionlimit(100000)


def read_values(): return map(int, input().split())
def read_index(): return map(lambda x: int(x) - 1, input().split())
def read_list(): return list(read_values())
def read_lists(N): return [read_list() for n in range(N)]


class V:
    def __init__(self, f, v=None):
        self.f = f
        self.v = v
 
    def __str__(self):
        return str(self.v)
 
    def ud(self, n):
        if n is None:
            return

        if self.v is None:
            self.v = n
            return
        self.v = self.f(self.v, n) 


def main():
    N = int(input())
    S = 0
    for n in range(1, N + 1):
        if n % 3 == 0 or n % 5 == 0:
            continue
        S += n
    print(S)


if __name__ == "__main__":
    main()

Solution (Python):

N = int(input())
ans = 0

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

Solution (Python):
N = int(input())

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

Solution (Python):
ans = 0
n = int(input())

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