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):
import sys, bisect, math, itertools, string, queue, copy


from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush
from fractions import gcd

sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

def main():
    n = inp()
    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):
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(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 % 15 != 0 and 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):
import sys













readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    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)


if __name__ == '__main__':
    main()

Solution (Python):


import sys
import math
import collections
import itertools
INF = 10 ** 13
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def lcm(x, y) : return (x * y) // math.gcd(x, y)
def I() : return int(input())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def LS() : return input().split()
def RS(N) : return [input() for _ in range(N)]
def LRS(N) : return [input().split() for _ in range(N)]
def PL(L) : print(*L, sep="\n")

N = I()

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(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 and i%5!=0:
    cnt+=i

print(cnt)

Solution (Python):
n = int(input())
s = (1+n) * n // 2
for i in range(1, n+1):
    if i % 3 == 0 or i % 5 == 0:
        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):
import sys
sys.setrecursionlimit(1000000)

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

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

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
    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(N+1):
    if i%5 and i%3: 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
def input(): return sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

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

print(sum(a))

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 n in range(1, N + 1):
    if n % 3 == 0:
        continue
    if n % 5 == 0:
        continue
    ans += n

print(ans)

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

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

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


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(1,n+1):
  if i%3 and i%5:
    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):
def examA():
    N = SI()
    ans = "No"
    for s in N:
        if s=="7":
            ans = "Yes"
    print(ans)
    return

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

def examC():
    ans = 0
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def I(): return int(readline())
def LI(): return list(map(int,readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = 10**(-12)
alphabet = [chr(ord('a') + i) for i in range(26)]

sys.setrecursionlimit(10**7)

if __name__ == '__main__':
    examB()

"""
142
12 9 1445 0 1
asd dfg hj o o
aidn
"""

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

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

t = 0

for i in range(n+1):
    if i % 3 != 0 and i % 5 != 0:
        t += i
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 = ans + i

print(ans)

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

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: print('Yes' if b else 'No')
YESNO=lambda b: print('YES' if b else 'NO')

def main():
    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)

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())
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%5!=0:
        if i%3!=0:
            ans += i
print(ans)

Solution (Python):

import sys
sys.setrecursionlimit(10**8)
INF = float("inf")


def solve(N: int):
    tot = 0
    for i in range(1, N+1):
        if not (i % 5 == 0 or i % 3 == 0):
            tot += i
    print(tot)

    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    solve(N)


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 and i % 15 != 0:
        ans += i
print(ans)

Solution (Python):
def Int():
    return int(input())
def Ints():
    return map(int,input().split())
def IntList():
    return list(Ints())
def IntMat(N):
    return [IntList() for i in range(N)]

ans = 0
N = Int()

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

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

    ret = 0
    for x in range(1, N + 1):
        if x % 3 == 0: continue
        if x % 5 == 0: continue
        ret += x
    print(ret)


if __name__ == '__main__':
    main()

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):



def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)
    

    def dump(*args):
        sys.stderr.write(str(args))

    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)


if __name__ == '__main__':
    main()

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

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,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): 
  return list(map(int,input().split()))
def m(): 
  return map(int,input().split())
def onem(): 
  return int(input())
def s(x): 
  a = []
  if len(x) == 0:
    return []
  aa = x[0]
  su = 1
  for i in range(len(x)-1):
    if aa != x[i+1]:
      a.append([aa,su])
      aa = x[i+1]
      su = 1
    else:
      su += 1
  a.append([aa,su])
  return a
def jo(x): 
  return " ".join(map(str,x))
def max2(x): 
  return max(map(max,x))
def In(x,a): 
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
  ll = 0
  rr = r
  while True:
    mid = (ll+rr)//2

  if rr == mid:
    return ll
  if (ここに評価入れる):
    rr = mid
  else:
    ll = mid+1
"""
n = onem()
su = 0
for i in range(1,n+1):
  if i % 3 != 0 and i % 5 != 0:
    su += i
print(su)

Solution (Python):


import sys
sys.setrecursionlimit(300000)


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

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    solve(N)

if __name__ == '__main__':
    main()

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    N = I()
    cnt = 0
    for i in range(N+1):
        if i % 3 == 0:
            continue
        if i % 5 == 0:
            continue
        cnt += i
    print(cnt)

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 % 5 != 0 and i % 3 != 0:
        ans += i
print(ans)

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float("INF")


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



if __name__ == '__main__':
    solve()

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 and i%5]))

Solution (Python):
from sys import stdin
from sys import setrecursionlimit
from math import ceil
from collections import Counter, deque, defaultdict
setrecursionlimit(1000000)


INF = int(1e10)

def input():
    return stdin.readline()[:-1]

def main():
    from builtins import int, map
    n = int(input())
    sum = 0
    for i in range(1, n + 1):
        if i % 3 != 0 and i % 5 != 0:
            sum += i
    print(sum)

if __name__ == '__main__':
    main()

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

Solution (Python):
a = int(input())
ans = 0
for i in range(1,a+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):
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

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


print(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):
N = int(input())
ans = 0
for i in range(1,N+1):
    if i%3 == 0 or i%5 == 0:
        ans += 0
    else:
        ans += i
print(ans)

Solution (Python):
s=0
N=int(input())
for a in range(1,N+1):
    if a%3!=0 and a%5!=0:
        s+=a
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):
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()

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):
from collections import deque, Counter
from itertools import chain, combinations
import json
import numpy as np
import bisect
import sys

sys.setrecursionlimit(10 ** 8)


M = 10 ** 9 + 7


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

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


if __name__ == "__main__":
    main()

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

Solution (Python):

from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.buffer.readline().split()]
def I(): return int(sys.stdin.buffer.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

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


if __name__ == "__main__":
    solve()

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
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 LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

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

main()

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)

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

n = ni()
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 n in range(1,N+1):
    if n%3==0 or n%5==0: continue
    ans += n
print(ans)

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

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 sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue
from decimal import *


class Scanner():
    @staticmethod
    def int():
        return int(sys.stdin.readline().rstrip())

    @staticmethod
    def string():
        return sys.stdin.readline().rstrip()

    @staticmethod
    def map_int():
        return [int(x) for x in Scanner.string().split()]

    @staticmethod
    def string_list(n):
        return [input() for i in range(n)]

    @staticmethod
    def int_list_list(n):
        return [Scanner.map_int() for i in range(n)]

    @staticmethod
    def int_cols_list(n):
        return [int(input()) for i in range(n)]


class Math():
    @staticmethod
    def gcd(a, b):
        if b == 0:
            return a
        return Math.gcd(b, a % b)

    @staticmethod
    def lcm(a, b):
        return (a * b) // Math.gcd(a, b)

    @staticmethod
    def divisor(n):
        res = []
        i = 1
        for i in range(1, int(n ** 0.5) + 1):
            if n % i == 0:
                res.append(i)
                if i != n // i:
                    res.append(n // i)
        return res

    @staticmethod
    def round_up(a, b):
        return -(-a // b)

    @staticmethod
    def is_prime(n):
        if n < 2:
            return False
        if n == 2:
            return True
        if n % 2 == 0:
            return False
        d = int(n ** 0.5) + 1
        for i in range(3, d + 1, 2):
            if n % i == 0:
                return False
        return True


def pop_count(x):
    x = x - ((x >> 1) & 0x5555555555555555)
    x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)
    x = (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f
    x = x + (x >> 8)
    x = x + (x >> 16)
    x = x + (x >> 32)
    return x & 0x0000007f


MOD = int(1e09) + 7
INF = int(1e15)


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


def main():
    
    solve()


if __name__ == "__main__":
    main()

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)

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(2 * 10**6)


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


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):
def main():
    n = int(input())
    answer = 0
    for i in range(1, n + 1):
        if i % 3 and i % 5:
            answer += i
    print(answer)


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())
ans = 0
for i in range(1, n + 1):
    if i % 3 != 0 and i % 5 != 0:
        ans += i
print(ans)