Harryxun/stf_run huggingface dataset:
input = int(input())
a = []
i = 1
while(i <= input):
  if i%3 == 0 and i%5 == 0:
    a[i] = FizzBuzz
  elif i%3 == 0:
    a[i] = Fizz
  elif i%5 == 0:
    a[i] = Buzz
  else:
    a[i] = i
  i += 1
sum = 0
for j in a:
  if a[i] != "Fizz" and a[i] != "Buzz" and a[i] != "FizzBuzz":
    sum = sum + a[i]
print(sum)

### FIXED CODE ###

input = input()
a = []
i = 1
while(i <= int(input)):
    if i%3 == 0 or i%5 == 0:
        pass
    else:
        a.append(i)
    i += 1
res = 0
for j in a:
  res = res + j
print(res)
def solve(N, S, k):
    k -= 1

    # i-th of these counts the thing in [ max(0, i-k), i ).
    D_counts  = [0]
    M_counts  = [0]
    DM_counts = [0]

    D = 0
    M = 0
    DM = 0
    for i in range(k):
        if S[i] == 'D':
            D += 1
        elif S[i] == 'M':
            DM += D
            M += 1
        D_counts.append(D)
        M_counts.append(M)
        DM_counts.append(DM)
    for i in range(k, N):
        if S[i-k] == 'D':
            D -= 1
            DM -= M
        elif S[i-k] == 'M':
            M -= 1

        if S[i] == 'D':
            D += 1
        elif S[i] == 'M':
            DM += D
            M += 1
            
        D_counts.append(D)
        M_counts.append(M)
        DM_counts.append(DM)

    ans = 0
    for i, c in enumerate(S):
        if c == 'C':
            ans += DM_counts[i]
    return ans

def main():
    N = int(input())
    S = input()
    Q = int(input())
    ks = list(map(int, input().split()))
    for k in ks:
        print(solve(N, S, k))

def cc_export():
    from numba.pycc import CC
    cc = CC('my_module')
    cc.export('solve')(solve)
    cc.compile()

if __name__ == '__main__':
    import sys
    if sys.argv[-1] == 'ONLINE_JUDGE':
        cc_export()
        exit(0)
    from my_module import solve
    main()

### FIXED CODE ###

import numpy as np
from numba import njit

N = int(input())
S = input()
Q = int(input())
ks = list(map(int, input().split()))

def func(ch):
    if ch == 'D':
        return 1
    if ch == 'M':
        return 2
    if ch == 'C':
        return 3
    return 0
    
S_arr = np.array([func(ch) for ch in S], dtype = np.int32)

@njit("i8(i8, i4[:], i8)", cache = True)
def solve(N, S_arr, k):
    ans = 0
    D = 0
    M = 0
    DM = 0
    for i in range(k):
        if S_arr[i] == 1:
            D += 1
        elif S_arr[i] == 2:
            DM += D
            M += 1
        elif S_arr[i] == 3:
            ans += DM
    for i in range(k, N):
        if S_arr[i-k] == 1:
            D -= 1
            DM -= M
        elif S_arr[i-k] == 2:
            M -= 1

        if S_arr[i] == 1:
            D += 1
        elif S_arr[i] == 2:
            DM += D
            M += 1
        elif S_arr[i] == 3:
            ans += DM

    return ans

for k in ks:
    print(solve(N, S_arr, k))
A,op,B=input.split() 
if op=="+": 
    print(int(A)+int(B)) 
else: 
    print(int(A)-int(B))

### FIXED CODE ###

A,op,B=input().split() 
if op=="+": 
    print(int(A)+int(B)) 
else: 
    print(int(A)-int(B))
n = list(map(input().split()))
if len(set(n)) == 1:
    print("No")
else:
    print("Yes")

### FIXED CODE ###

n = input()
s = list(n)
if len(set(s)) == 1:
    print("No")
else:
    print("Yes")
import numpy as np
N=int(input())
A=np.array[input()]
S=1

for i in range(N):
  S=S*A[i]
  
if S>10^18:
  S=-1
  
print(S)


### FIXED CODE ###

def main():
  N=int(input())
  A = list(map(int, input().split()))
  if 0 in A:
    print(0)
    return
  S=1
  for a in A:
    S*=a
    if S>10**18:
      print(-1)
      return
  print(S)


main()
n=int(input())
l=list(map(int,input().split()))
l.sort()
ans=0
for i in range(n):
  for j in range(i+1,n):
    for k in range(j+1,n):
      if l[i]!=l[j]!=l[k]:
        if l[j]+l[i]>l[k]:
        ans+=1

print(ans)

### FIXED CODE ###

ss=str(input())
a=int(ss.count("R"))

if ss=="RSR":
  a=1

print(a)
n=int(input())
l=list(map(int,input().split()))

ans=[0]*n

for i in l:
    ans[i-1]+=1

for j in ans:
    print(j)

### FIXED CODE ###

N,K = map(int, input().split())
min_num = 0
max_num = 0
for i in range(K):
    min_num += i
    max_num += N - i
ans = max_num - min_num + 1
for i in range(K, N+1):
    min_num += i
    max_num += N - i
    ans += max_num - min_num + 1
print(ans%(10**9 + 7))
N = input().strip()

SN = sum(int(c) for c in N)

if N % SN == 0:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

N = input().strip()

SN = sum(int(c) for c in N)

if int(N) % SN == 0:
    print('Yes')
else:
    print('No')
n,k = map(int, input().split())
num = 1
for i in range(n):
    num = min(num+k,num*2)
print(num)


### FIXED CODE ###

n = int(input())
k = int(input())
num = 1
for i in range(n):
    num = min(num+k,num*2)
print(num)
N = int(input())
A = int(input())
B = int(input())



    #x = sum(l)
array = 0

for i in range(N+1):
    l =[int(x) for x in list(str(i))]
    f = sum(l)
    if f >= A and f <= B:
        array = array + i

print(array)

### FIXED CODE ###

li = list(map(int,input().split()))


array = 0

for i in range(li[0]+1):
    l =[int(x) for x in list(str(i))]
    f = sum(l)
    if f >= li[1] and f <= li[2]:
        array = array + i

print(array)
# C問題
import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

A, B, C, D = map(int, input().split())
E = lcm(C, D)
ac = A // C
bc = B // C
ad = A // D
bd = B // D
ae = A // E
be = B // E
xx = bc - ac + bd - ad
yy = be - ae
print(B - A + 1 - xx + yy)

### FIXED CODE ###

# C問題
import fractions
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

A, B, C, D = map(int, input().split())
E = lcm(C, D)
ac = A // C
bc = B // C
ad = A // D
bd = B // D
ae = A // E
be = B // E
if A % C == 0:
    ac -= 1
if A % D == 0:
    ad -= 1
if A % E == 0:
    ae -= 1
xx = bc - ac + bd - ad
yy = be - ae
print(B - A + 1 - xx + yy)
s = input()

s.sort()

if s[0] == s[1] and s[2] == s[3]:
  if s[0] != s[2] and s[1] != s[2]:
    print("Yes")
    exit()
print("No")

    

### FIXED CODE ###

s = list(input())

s.sort()

if s[0] == s[1] and s[2] == s[3]:
  if s[0] != s[2] and s[1] != s[2]:
    print("Yes")
    exit()
print("No")
a = input().split()
num = 3

if a[0] == a[1]:
    num = num - 1
    if a[1] == a[2]:
        num = num - 1:
elif a[0] == a[2]:
    num = num - 1
elif a[1] == a[2]:
    num = num - 1
    
print(num)

### FIXED CODE ###

a = input().split()
num = 3

if a[0] == a[1]:
    num = num - 1
    if a[0] == a[2]:
        num = num - 1
elif a[0] == a[2]:
    num = num - 1
elif a[1] == a[2]:
    num = num - 1
    
print(num)
a,b,c=map(int,input().split())
import math
if 4a*b<(c-a-b)**2
  print('Yes')
else:
  print('No')


### FIXED CODE ###

a,b,c=map(int,input().split())
import math
if 4*a*b<(c-a-b)**2 and c-a-b>=0:
  print('Yes')
else:
  print('No')
import numpy as np
N = list(input())
a = list(map(int,input().split()))

for i in range(1,30):
  b = np.array([n/2 if n%2==0 else 0 for n in a])
  a = b
  if 0 in list(b):
    print(i-1)
    exit()

### FIXED CODE ###

l = list(input())
n=0
for i in l :
  if int(i)==1:
    n += 1
print(n)
k, x = map(int, input())

if(k * 500 >= x): print("Yes")
else: print("No")

### FIXED CODE ###

k, x = map(int, input().split())

if k * 500 >= x: print("Yes")
else: print("No")
N = int(input())
A = list(map(int, input().split()))

ans = all(a%3==0 or a%5==0 for a in A if a%2==0)
if ans:
    print("APPROVED")
else:
    print("DENIED")


### FIXED CODE ###

A, B, C = map(int, input().split())
if A == B and A == C:
    print("No")
elif A == B or A == C or B == C:
    print("Yes")
else:
    print("No")
N = int(input())
if N%2==0:
  N_=int(N/2)
  print(N_*(N-1))
else N%2!=0:
  N_=int((N-1)/2)
  print(N_*N)

### FIXED CODE ###

N = int(input())
if N%2==0:
  N_=int(N/2)
  print(N_*(N-1))
else:
  N_=int((N-1)/2)
  print(N_*N)
import math

#n,k
n,k = (int(x) for x in input().split())

b = n % k

print(b)

#c = abs(k-b)

if b < c:
    ans = b
else:
    ans = c

print(ans)

### FIXED CODE ###

import math

#n,k
n,k = (int(x) for x in input().split())

b = n % k

#print(b)

c = abs(k-b)

if b < c:
    ans = b
else:
    ans = c

print(ans)
n,k=map(int,input().split())
s=input()
hap=0
for i in range(n):
  if(i==0):
    if(s[0]==s[1]=='R'):
      hap+=1
  elif(i==n-1):
    if(s[n-2]==s[n-1]=='L'):
      hap+=1
  else:
    if(s[i]==s[i+1]=='R' or s[i-1]==s[i]=='L'):
      hap+=1
print(min(hap+2*k,n-1))

### FIXED CODE ###

n,k=map(int,input().split())
s=input()
hap=0
if(n>1):
  for i in range(n):
    if(i==0):
      if(s[0]==s[1]=='R'):
        hap+=1
    elif(i==n-1):
      if(s[n-2]==s[n-1]=='L'):
        hap+=1
    else:
      if(s[i]==s[i+1]=='R' or s[i-1]==s[i]=='L'):
        hap+=1
print(min(hap+2*k,n-1))
import bisect
import copy
import heapq
import sys
import itertools
import math
import queue
input = sys.stdin.readline
sys.setrecursionlimit(1000000)
mod = 10 ** 9 + 7

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)]
def init_dp1(init, N): return [init for _ in range(N)]
def init_dp2(init, N, M): return [[init for _ in range(M)] for _ 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, M = read_values()

    if N % 2 == 1: 
        L = N // 2
        R = L + 1
        for _ in range(M):
            print(L, R)
            L -= 1
            R += 1
    else:
        F = [False] * N
        d = 1
        f = 0
        for _ in range(M):
            while F[f]:
                f += 1

            print(f + 1, f + d + 1)
            F[f + d] = True
            d += 1
            f += 1


if __name__ == "__main__":
    main()


### FIXED CODE ###

import bisect
import copy
import heapq
import sys
import itertools
import math
import queue
input = sys.stdin.readline
sys.setrecursionlimit(1000000)
mod = 10 ** 9 + 7

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)]
def init_dp1(init, N): return [init for _ in range(N)]
def init_dp2(init, N, M): return [[init for _ in range(M)] for _ 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, M = read_values()

    if N % 2 == 1: 
        L = N // 2
        R = L + 1
        for _ in range(M):
            print(L, R)
            L -= 1
            R += 1
    else:
        L = 1
        R = M + 1
        for _ in range(M, 0, -2):
            print(L, R)
            L += 1
            R -= 1
        
        L = M + 2
        R = 2 * M + 1
        for _ in range(M - 1, 0, -2):
            print(L, R)
            L += 1
            R -= 1


if __name__ == "__main__":
    main()
while True:
  a = map(int, raw_input().split())
  if a.count(0) == 2: break
  print " ".join(map(str, a.sort()))

### FIXED CODE ###

while True:
  a = map(int, raw_input().split())
  if a.count(0) == 2: break
  print " ".join(map(str, sorted(a)))
n,z,w = map(int,input().split())
a = [int(i) for i in input().split()]

print(max(abs(a[-1]-w),abs(a[-2]-a[-1])))

### FIXED CODE ###

n,z,w = map(int,input().split())
a = [int(i) for i in input().split()]

if n == 1:
  print(abs(a[-1]-w))
else:
  print(max(abs(a[-1]-w),abs(a[-2]-a[-1])))
#!/usr/bin/env python3

import sys
import math
import numpy as np
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()))

k,q = LI()
d = LI()
nxm = [LI() for _ in range(q)]

for n,x,m in nxm:
    e = list(map(lambda x:x%m,d))
    zero = e.count(0)
    zero = zero*((n-1)//k)
    for i in range((n-1)%k):
        if e[i] == 0:
            zero += 1
    f = list(accumulate(e))
    s = f[-1] * ((n-1)//k)
    if (n-1)%k != 0:
        s += f[(n-1)%k-1]
    tmp = (s+x%m)//m
    print(n-1-zero-tmp)

    
    


### FIXED CODE ###

#!/usr/bin/env python3

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

k,q = LI()
d = LI()
nxm = [LI() for _ in range(q)]

for n,x,m in nxm:
    e = list(map(lambda x:(x-1)%m+1,d))
    f = list(accumulate(e))
    s = f[-1] * ((n-1)//k)
    if (n-1)%k != 0:
        s += f[(n-1)%k-1]
    tmp = (s+x%m)//m
    print(n-1-tmp)
import math
A,B,H,M = map(int, input().split())
a = 360*H/12+30*M/60
b = 360*M/60
c = abs(a-b)
if c < 90:
    sin(c) = math.sin(math.radians(c))
    cos(c) = math.sin(math.radians(c))
    d = B-A*cos(c)
    e = (d**2+(A*sin(c))**2)**0.5
    print(e)
elif c == 90:
    e = (A**2+B**2)**0.5
    print(e)
elif c > 90:
    sin(c) = math.sin(math.radians(180-c))
    cos(c) = math.sin(math.radians(180-c))
    d = B+A*cos(c)
    e = (d**2+(A*sin(c)**2)**0.5
    print(e)

### FIXED CODE ###

import math
A,B,H,M = map(int, input().split())
a = 360*H/12+30*M/60
b = 360*M/60
c = abs(a-b)
d = A**2+B**2-2*A*B*math.cos(math.radians(c))
print(math.sqrt(d))
S = int(input())
s_dict = {'a': 0, 'b': 0, 'c': 0}
for s in S:
  s_dict[s] += 1
if max(s_dict.values())-min(s_dict.values()) > 1:
  print('NO')
else:
  print('YES')

### FIXED CODE ###

S = input()
s_dict = {'a': 0, 'b': 0, 'c': 0}
for s in S:
  s_dict[s] += 1
if max(s_dict.values())-min(s_dict.values()) > 1:
  print('NO')
else:
  print('YES')
from sys import stdin
from itertools import groupby

s = stdin.readline().rstrip()
k = int(stdin.readline().rstrip())

def cou(st):
    li = []
    point = 1
    for i in range(len(st)-1):
        if st[i] == st[i+1]:
            point += 1
            if i == len(st)-2:
                li.append(point)
        else:
            li.append(point)
            point = 1
    return li

lin = cou(s)

if len(lin) == 1:
    print(lin[0]*k//2)
    exit()

if k > 1:
    if s[0] == s[-1]:
        lin[-1] += lin[0]
else:
    if len(s) == 1:
        print(0)
        exit()

point = 0
for i in range(1,len(lin)):
    point += lin[i]//2
point = point*k+lin[0]//2
print(point)

### FIXED CODE ###

# AGC039A - Connection and Disconnection
from itertools import groupby


def main():
    S = input().rstrip()
    K = int(input())
    cnt = [len(tuple(s)) for _, s in groupby(S)]  # count of continuous characters
    if S[0] == S[-1] and K > 1:
        if len(cnt) == 1:  # one character
            ans = cnt[0] * K // 2
        else:  # first (= last) character in S + characters inside S
            ans = cnt[0] // 2 + cnt[-1] // 2 + (cnt[0] + cnt[-1]) // 2 * (K - 1)
            ans += sum(i // 2 for i in cnt[1:-1]) * K
    else:
        ans = sum(i // 2 for i in cnt) * K
    print(ans)


if __name__ == "__main__":
    main()
from collections import*
n=int(input())
a=list(map(int,input().split()))
ans=a[0]
for i in a[1:]:
  ans^=i
a=dict(Counter(a))
ak=list(a.keys())
if len(a)==1 and ak[0]!=0:ans=1
elif len(a)==2 and a.get(0)!=n//3:ans=1
elif len(a)==3 and not(a[ak[0]]==a[ak[1]]==a[ak[2]]==n//3):ans=1
elif len(a)>3:ans=1
print(['Yes','No'][ans])

### FIXED CODE ###

from collections import*
n=int(input())
a=list(map(int,input().split()))
ans=a[0]
for i in a[1:]:
  ans^=i
a=dict(Counter(a))
ak=list(a.keys())
if len(a)==1 and ak[0]!=0:ans=1
elif len(a)==2 and a.get(0)!=n//3:ans=1
elif len(a)==3 and not(a[ak[0]]==a[ak[1]]==a[ak[2]]==n//3):ans=1
elif len(a)>3:ans=1
print(['Yes','No'][ans>0])
from heapq import heappush, heappop
n = int(input())
adj = [[] for _ in range(n)]
for _ in range(n-1):
	a, b = map(int, input().split())
	adj[a-1].append(b-1)
	adj[b-1].append(a-1)
num = [0 for _ in range(n)]
c = list(map(int, input().split()))
h = []
for i in range(n):
	heappush(h, -c[i])

def dfs(x, par):
	global h
	for v in adj[x]:
		if v == par:
			continue
		num[v] = -heappop(h)
		dfs(v, x)
	return

num[0] = -heappop(h)
dfs(0, -1)
print(sum(c) - max(c))
print(*num)

### FIXED CODE ###

import sys
from heapq import heappush, heappop
sys.setrecursionlimit(10**6)

n = int(input())
adj = [[] for _ in range(n)]
for _ in range(n-1):
	a, b = map(int, input().split())
	adj[a-1].append(b-1)
	adj[b-1].append(a-1)
num = [0 for _ in range(n)]
c = list(map(int, input().split()))
h = []
for i in range(n):
	heappush(h, -c[i])

def dfs(x):
	global h
	for v in adj[x]:
		if num[v] != 0:
			continue
		num[v] = -heappop(h)
		dfs(v)
	return

num[0] = -heappop(h)
dfs(0)
print(sum(c) - max(c))
print(*num)
print(int(input())-int(input())+1)

### FIXED CODE ###

a,b=map(int,input().split());print(a-b+1)
n, m = map(int, input().split())
lst = [input() for _ in range(n)]

def check(lst, i, j, n, m):
    if i == 0:
        row_lst = [i, i+1]
    elif i == n-1:
        row_lst = [i-1, i]
    else:
        row_lst = [i-1, i, i+1]
    if j == 0:
        col_lst = [j, j+1]
    elif j == m-1:
        col_lst = [j-1, j]
    else:
        col_lst = [j-1, j, j+1]
    count = 0
    for a in row_lst:
        for b in col_lst:
            if lst[a][b] == '#':
                count += 1
    return count


for i in range(n):
    ans = ''
    for j in range(m):
        if lst[i][j] == '#':
            ans += '#'
        else:
            ans += str(check(lst, i, j, n, m))
    print(ans)            

### FIXED CODE ###

n, m = map(int, input().split())
lst = [input() for _ in range(n)]

def check(lst, i, j, n, m):
    if n == 1:
        row_lst = [0]
    elif i == 0:
        row_lst = [i, i+1]
    elif i == n-1:
        row_lst = [i-1, i]
    else:
        row_lst = [i-1, i, i+1]
    if m == 1:
        col_lst = [0]
    elif j == 0:
        col_lst = [j, j+1]
    elif j == m-1:
        col_lst = [j-1, j]
    else:
        col_lst = [j-1, j, j+1]
    count = 0
    for a in row_lst:
        for b in col_lst:
            if lst[a][b] == '#':
                count += 1
    return count


for i in range(n):
    ans = ''
    for j in range(m):
        if lst[i][j] == '#':
            ans += '#'
        else:
            ans += str(check(lst, i, j, n, m))
    print(ans)
counts = [0] * 26

while True:
	s = str(input())
	if s == '': break
	
	for c in s:
		o = ord(c)
		if o >= 65 and o <= 90:
			counts[o - 65] += 1
		elif o >= 97 and o <= 122:
			counts[o - 97] += 1
	
for i in range(len(counts)):
	print(chr(i + 97) + ' : ' + str(counts[i]))



### FIXED CODE ###

import sys
counts = [0] * 26

s = sys.stdin.read()
	
for c in s:
	o = ord(c)
	if o >= 65 and o <= 90:
		counts[o - 65] += 1
	elif o >= 97 and o <= 122:
		counts[o - 97] += 1
	
for i in range(len(counts)):
	print(chr(i + 97) + ' : ' + str(counts[i]))
a,b,c,d,e,f=map(int,input().split())
dp=[0]*(f+1)
w=[]
s=[]
for i in range(f+1):
  if i%(a*100)==0:dp[i]=i
  if i%(b*100)==0:dp[i]=i
  if i>a*100 and dp[i-a*100]:dp[i]=i
  if i>a*100 and dp[i-b*100]:dp[i]=i
for i in dp:
  if i:w.append(i)
m=w[-1]*e//100+1
dp=[0]*(m)
for i in range(m):
  if i%c==0:dp[i]=i
  if i%d==0:dp[i]=i
  if i>c and dp[i-c]:dp[i]=i
  if i>d and dp[i-d]:dp[i]=i
for i in dp:
  if i: s.append(i)
g=0
for i in w:
  for j in s:
    if i+j<=f and g<j/(i+j)<=e/(100+e):
      g=j/(i+j)
      ans=(i+j,j)
print(*ans)

### FIXED CODE ###

a,b,c,d,e,f=map(int,input().split())
dp=[0]*(f+1)
w=[]
s=[]
for i in range(f+1):
  if i%(a*100)==0:dp[i]=i
  if i%(b*100)==0:dp[i]=i
  if i>a*100 and dp[i-a*100]:dp[i]=i
  if i>a*100 and dp[i-b*100]:dp[i]=i
for i in dp:
  if i:w.append(i)
m=w[-1]*e//100+1
dp=[0]*(m)
for i in range(m):
  if i%c==0:dp[i]=i
  if i%d==0:dp[i]=i
  if i>c and dp[i-c]:dp[i]=i
  if i>d and dp[i-d]:dp[i]=i
for i in dp:
  if i: s.append(i)
g=0
ans=(w[0],0)
for i in w:
  for j in s:
    if i+j<=f and g<j/(i+j)<=e/(100+e):
      g=j/(i+j)
      ans=(i+j,j)
print(*ans)
import sys

N=int(input())

if N==1:
  print(1)
  sys.exit()

Flag=0
nCnt=1
Tmp=2
while Flag=0:
  TmpN = N /Tmp
  if TMpN >= 2:
    Tmp *= 2
    nCnt +=1
  else:
    Flag=1

A = 2 ** (nCnt)
print(A)



### FIXED CODE ###

import sys
 
N=int(input())
 
if N==1:
  print(1)
  sys.exit()

Flag=0
nCnt=1
Tmp=2
while Flag==0:
  TmpN = N /Tmp
  if TmpN >= 2:
    Tmp *= 2
    nCnt +=1
  else:
    Flag=1

A = 2 ** (nCnt)
print(A)
# B - Frog2
import numpy as np

N, K = list(map(int, input().split()))
h = list(map(int, input().split()))

dp = [10**9]*(N+K)
dp[0] = 0

for i in range(N):
    dp[i+1:i+K+1] = min(dp[i+1:i+K+1], dp[i]+abs(h[i+1:i+K+1]-h[i]))
print(dp[N-1])

### FIXED CODE ###

# B - Frog2
import numpy as np

N, K = list(map(int, input().split()))
h = np.array(list(map(int, input().split()))+[0]*K)

dp = np.array([10**9]*(N+K))
dp[0] = 0

for i in range(N):
    dp[i+1:i+K+1] = np.minimum(dp[i+1:i+K+1], dp[i]+abs(h[i+1:i+K+1]-h[i]))
print(dp[N-1])
a,b=map(int,input().split())
n=[int(input()) for i in reange(b+1)]
if a<=sum(n):
  print('Yes')
else:
  print('No')

### FIXED CODE ###

a,b=map(int,input().split())
n=list(map(int,input().split()))
if a<=sum(n):
  print('Yes')
else:
  print('No')
n, m, q = map(int, input().split())

abcd = [list(map(int, input.split())) for _ in range(q)]
from itertools import combinations_with_replacement as cwr
A = list(cwr(range(1, m+1), n))


maxPoint = 0
for item in A:
  point = 0
  for i in range(len(abcd))
  a = abcd[i][0]
  b = abcd[i][1]
  c = abcd[i][2]
  d = abcd[i][3]
  if item[b-1] - item[a-1] == item[c-1]:
    point += d
  if point > maxPoint:
    maxPoint = point
print(maxPoint)

### FIXED CODE ###

n, m, q = map(int, input().split())

abcd = [list(map(int, input().split())) for _ in range(q)]
from itertools import combinations_with_replacement as cwr
AList = list(cwr(range(1, m+1), n))


maxPoint = 0
for A in AList:
  point = 0
  for abc in abcd:
    a = abc[0]
    b = abc[1]
    c = abc[2]
    d = abc[3]
    if A[b-1] - A[a-1] == c:
      point += d
  if point > maxPoint:
    maxPoint = point
print(maxPoint)
N, X = list(map(int, input().split()))
l = list(map(int, input().split()))

D=0
i=0
c=0
while D <= X:
    c+=1
    D+=l[i]
    i+=1
    if i>len(l):
        break

print(c)


### FIXED CODE ###

N, X = list(map(int, input().split()))
l = list(map(int, input().split()))

D=0
i=0
c=0
while D <= X:
    try:
        c+=1
        # if i>len(l):
        #     break
        D+=l[i]
        i+=1
    except IndexError:
        break

print(c)
print("2018"+s[4:])

### FIXED CODE ###

s = input()
print("2018"+s[4::])
N = int(input())
S = [int(input()) for _ in range(N)]

rr = []
ans = 0
for i in range(N):
    ans += S[i]
    if S[i]%10!=0:
        rr.append(S[i])

rr.sort()
if ans%10==0:
    if len(rr)>0:
        ans -= r[0]
    else:
        ans = 0

print(ans)



### FIXED CODE ###

N = int(input())
S = [int(input()) for _ in range(N)]
sumS = sum(S)
T = list(filter(lambda x : x%10!=0, S))
T.sort()
if len(T)==0:
    print(0)
else:
    for t in T:
        if sumS%10!=0:
            break
        else:
            sumS -= t
    print(sumS)