Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

import numpy as np
import math
N,K = map(int, input().split()) 
Logs = np.array([float(x) for x in input().split()])
cut = [1.0]*N
chip = Logs.copy()
for i in range(K):
  x = np.argmax(chip)
  cut[x]+=1.0
  chip[x]= Logs[x]/cut[x]
print(math.ceil((max(chip))))

### FIXED CODE ###

import numpy as np
import math
N,K = map(int, input().split()) 
Logs = np.array([int(x) for x in input().split()])
ave = sum(Logs)/(N+K)
cut = np.array([max(1,int(x/ave)) for x in Logs])
chip = Logs/cut
chip=np.sort(chip)[::-1]
print(math.ceil(chip[N+K-sum(cut)]))
### BUGGY CODE ###

S = input()
# print("Q=")
Q = int(input())

def problem_gksn(S,Q):
  for _ in range(Q):
    # print("queryを入力してください")
    query = input().split()
    # print("query= ",query)
    if len(query) == 1: #1の場合
      # print("文字を反転させます")
      S = S[::-1]
    else: #2の場合
      # print("文字をくっつけます")
      if int(query[1]) == 2:
        S = S + query[2]
      else:
        S = query[2] + S
  
  return S
print(problem_gksn(S,Q))

### FIXED CODE ###

S = input()
# print("Q=")
Q = int(input())

def problem_gksn(S,Q):
  check_reverse = 0 # 偶数のとき正常, 奇数の時反転
  atama = ""
  oshiri = ""
  for _ in range(Q):
    # print("queryを入力してください")
    query = input().split()
    # print("query= ",query)
    if len(query) == 1: #1の場合
      # print("文字を反転させます")
      check_reverse += 1
      # S = S[::-1]
    else: #2の場合
      # print("文字をくっつけます")
      if int(query[1]) == 2 - check_reverse % 2:
        oshiri += query[2]
      else:
        atama += query[2]
      # print("atama",atama)
      # print("oshiri",oshiri)
  S = atama[::-1] + S + oshiri
  if check_reverse % 2==1:
    S = S[::-1]
  
  return S

print(problem_gksn(S,Q))
### BUGGY CODE ###

N = int(input())
A = list(map(int, input().split()))
A_set = list(set(A))
Ad = {}
for a_set in A_set:
  Ad[a_set] = A.count(a_set)
  
score_sum = 0
for x in list(Ad.values()):
  score_sum += (x>1) * x * (x-1) / 2

Ad_score = {}
for ad_key, ad_value in Ad.items():
  Ad_score[ad_key] = score_sum - (ad_value -1) * (ad_value > 0)

for a in A:
  print(str(int(Ad_score[a])))


### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))

# A_set = list(set(A))
# Ad = {a_set:A.count(a_set) for a_set in A_set}
Ad = {}
for i in A:
  if not i in Ad:
    Ad[i]=0
  Ad[i] += 1

score_sum = sum([x*(x-1)/2 for x in list(Ad.values())])

for a in A:
    print(int(score_sum - (Ad[a] - 1)))
### BUGGY CODE ###

n=int(input())
a=list(map(int,input().split()))
for i in range(n):
  if i==0:
    b=a[1:]
  elif i==n-1:
    b=a[:n-1]
  else:
    b=a[:i]+a[i+1:]
  b.sort()
  print(b[n//2-1])

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
b=sorted(a)
l=b[:n//2]
u=b[n//2:]
for i in a:
  if i <= l[-1]:
    print(u[0])
  else:
    print(l[-1])
### BUGGY CODE ###

import sys

class binarySearchTree:
    def __init__(self):
        self.root = None

    def insert(self, key):
        z = Node(key)
        y = None
        x = self.root
        while x:
            y = x
            if z.key < x.key:
                x = x.left
            else:
                x = x.right

        if y is None:
            self.root = z
        elif z.key < y.key:
            y.left = z
        else:
            y.right = z

    def printBT(self):
        print inorderTreeWalk(self.root)
        print preorderTreeWalk(self.root)

class Node:
    def __init__(self, key):
        self.key = key
        self.left = None
        self.right = None

def inorderTreeWalk(node):
    if node:
        return inorderTreeWalk(node.left) + " " + str(node.key) + inorderTreeWalk(node.right)
    return ""

def preorderTreeWalk(node):
    if node:
        return " " + str(node.key) + preorderTreeWalk(node.left) + preorderTreeWalk(node.right)
    return ""

if __name__ == "__main__":
    lines = sys.stdin.readlines()
    del lines[0]

    bt = binarySearchTree()
    for line in lines:
        if line[0] == "i":
            bt.insert(int(line.split()[1]))
        else:
            bt.printBT()

### FIXED CODE ###

import sys

class Node:
    def __init__(self, key):
        self.key = key
        self.parent = None
        self.left = None
        self.right = None

def insert(z):
    global root
    y = None
    x = root
    while x is not None:
        y = x
        if z.key < x.key:
            x = x.left
        else:
            x = x.right
    z.parent = y
    if y is None:
        root = z
    elif z.key < y.key:
        y.left = z
    else:
        y.right = z

def inorderTreeWalk(node):
    global In
    if node:
        inorderTreeWalk(node.left)
        In.append(str(node.key))
        inorderTreeWalk(node.right)

def preorderTreeWalk(node):
    global Pre
    if node:
        Pre.append(str(node.key))
        preorderTreeWalk(node.left)
        preorderTreeWalk(node.right)

if __name__ == "__main__":
    lines = sys.stdin.readlines()
    del lines[0]

    root = None
    for line in lines:
        if line[0] == "i":
            insert(Node(int(line.split()[1])))
        else:
            In = []
            Pre = []
            inorderTreeWalk(root)
            print " " + " ".join(map(str, In))
            preorderTreeWalk(root)
            print " " + " ".join(map(str, Pre))
### BUGGY CODE ###

N, M = map(int, input().split())

dp = [[10**10 for B in range(1 << N)] for i in range(M+1)]
dp[0][0] = 0

for i in range(M):
    a, b = map(int, input().split())
    c = [int(j) for j in input().split()]
    C = sum([1 << (x-1) for x in c])

    for B in range(1 << N):
        dp[i+1][B] = min(dp[i][B], dp[i+1][B])
        dp[i+1][B | C] = min(dp[i+1][B | C], dp[i][B]+a)

if dp[M][(1 << N)-1] == 10**10:
    print(-1)
else:
    print(dp[M][(1 << N)-1])


### FIXED CODE ###

N, M = map(int, input().split())
# print(N)

# DPテーブルを初期化
dp = [10**9] * 2**(N+1)  # dp[010100011010]: 状態010100011010に到達するための最小コスト
dp[0] = 0

# ループを回す
for i in range(M):
    a, b = map(int, input().split())
    c = [int(i) for i in input().split()]

    bit = 0
    for cb in c:
        bit += 2**(cb-1)

    for fromb in range(2**N):
        dp[fromb | bit] = min(dp[fromb | bit], dp[fromb]+a)

if dp[2**N-1] == 10**9:
    print(-1)
else:
    print(dp[2**N-1])
### BUGGY CODE ###

import math

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

r = 0

if n == s:
    print(n + 1)
    exit()
elif n < s:
    print(-1)
    exit()

nn = int(math.sqrt(n)) + 1

for i in range(2, nn):
    nt = n
    st = 0

    while nt > 0:
        st += nt % i
        nt //= i

    if st == s:
        print(i)
        exit()
    
for i in range(nn, 0, -1):
    nt = n
    st = 0

    b = (n - s) // i + 1
    
    while nt > 0:
        st += nt % b
        nt //= b

    if st == s:
        print(b)
        exit()

print(-1)

### FIXED CODE ###

import math

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


r = 0

if n == s:
    print(n + 1)
    exit()
elif n < s:
    print(-1)
    exit()

sq = int(math.sqrt(n))


# 2 <= d <= √n
for i in range(2, sq+1):
    nt = n
    st = 0

    while nt > 0:
        st += nt % i
        nt //= i

    if st == s:
        print(i)
        exit()
    
# √n < d <= n
for i in range(sq+1, 0, -1):
    b = (n - s) // i + 1
    
    st = n % b + n // b

    if n // b != b and st == s:
        print(b)
        exit()

print(-1)
### BUGGY CODE ###

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a

def lcm(x, y):
    return (x * y) // gcd(x, y)

N, M = map(int, input().split())
S = list(input())
T = list(input())

lcm_num = lcm(N,M)

# X = [0 for i in range(lcm_num)]

for i in range(lcm_num):
    if i == 0 or (i%(lcm_num // N) == 0 and i%(lcm_num // M) == 0):
        if S[i//(lcm_num // N)] == T[i//(lcm_num // M)]:
            continue
        else:
            print(-1)
            exit()

print(lcm_num)


### FIXED CODE ###

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a

def lcm(x, y):
    return (x * y) // gcd(x, y)

N, M = map(int, input().split())
S = input()
T = input()

lcm_num = lcm(N,M)
lN = lcm_num // N
lM = lcm_num // M
gcd_num = lN * lM

for i in range(0,lcm_num,gcd_num):
    if S[i//lN] == T[i//lM]:
        continue
    else:
        print(-1)
        exit()

print(lcm_num)
### BUGGY CODE ###

N,M = map(int,input().split())

ABlist = [list(map(int,input().split())) for n in range(N)]
Alist = [ab[0] for ab in ABlist]
Blist = [ab[1] for ab in ABlist]

sum = 0
flg = False
while True:
    min_ = min(Alist)
    min_index = Alist.index(min_)
    b_num = Blist[min_index]
    for i in range(b_num):
        M -= 1
        sum += min_
        if M==0:
            flg = True
            break
    Blist.remove(b_num)
    Alist.remove(Alist[min_index])
    if flg == True:
        break
print(sum)


### FIXED CODE ###

N,M = map(int,input().split())
ABlist = [tuple(map(int,input().split())) for _ in range(N)]
ABlist.sort()
money = 0
for AB in ABlist:
    maz_num = AB[1]
    maz_pri = AB[0]
    add_m = maz_pri*maz_num
    if M > 0:
        money += add_m
        M -= maz_num
    if M == 0:
        break
    if M < 0:
        while M!=0:
            money -= maz_pri
            M += 1
        break

print(money)
### BUGGY CODE ###

# import fractions
# import math
# import numpy as np
# from collections import Counter, deque
# from itertools import accumulate,permutations, combinations,combinations_with_replacement,product

def resolve():

    N=int(input())
    P=list(map(int,input().split()))
    A=[]
    for i in range(N):
        A.append(min(P[:i+1]))
    print(len(set(A)))

resolve()

### FIXED CODE ###

def resolve():

    N=int(input())
    P=list(map(int,input().split()))
    pmin=P[0]
    cnt=0
    for i in range(N):
        if P[i]<=pmin:
            cnt+=1
            pmin=P[i]
    print(cnt)

resolve()
### BUGGY CODE ###

import collections

h,w = map(int,input().split())
field = [list(input()) for i in range(h)]

ans = 0
dx = [1,0,-1,0]
dy = [0,1,0,-1]

def bfs(y,x):
    global ans
    c = tmp_field[y][x]
    for k in range(4):
        newy = y + dy[k]
        newx = x + dx[k]
        if 0<= newy < h and 0<= newx < w:
            if field[newy][newx] == "#":
                ans = max(ans,c+1)
                q.clear()
                break
            elif tmp_field[newy][newx] == 0:
                tmp_field[newy][newx] = c+1
                q.append((newy,newx))

for i in range(h):
    for j in range(w):
        if field[i][j] == ".":
            tmp_field = [[0]*w for _ in range(h)]
            q = collections.deque([])
            q.append((i,j))
            while q:
                s = q.popleft()
                y,x =  s[0],s[1]
                bfs(y,x)
print(ans)

### FIXED CODE ###

import collections

h,w = map(int,input().split())
tizu = [list(input()) for i in range(h)]

dy = [1,0,-1,0]
dx = [0,1,0,-1]

def f(y,x):
    for i in range(4):
        newy = y + dy[i]
        newx = x + dx[i]
        if 0 <= newy and newy < h and 0 <= newx and newx < w:
            if tizu[newy][newx] == ".":
                q.append((newy,newx))
                tizu[newy][newx] = "#"
            
q = collections.deque()
for i in range(h): 
    for k in range(w):
        if tizu[i][k] == "#":
            q.append((i,k))
ans = 0
while True:
    l = len(q)
    if l == 0:
        print(ans-1)
        exit()
    for i in range(l):
        yx = q.popleft()
        f(yx[0],yx[1])
    ans += 1
### BUGGY CODE ###

n,k=map(int,input().split())
a=list(map(int,input().split()))
b=[0]*(n+1)
b[0]=1
for i in range(1,n+1):
  b[i] = b[i-1] * a[i-1]
  if i < k+1:
    continue
  b[i] = b[i] // a[i-k-1]
  if b[i] > b[i-1]:
    print('Yes')
  else:
    print('No')

### FIXED CODE ###

n,k=map(int,input().split())
a=list(map(int,input().split()))
for i in range(k,n):
  if a[i] > a[i-k]:
    print('Yes')
  else:
    print('No')
### BUGGY CODE ###

N, X, Y = list(map(int, input().split(' ')))
X -= 1
Y -= 1
dist_map = {}

def search(origin):
  dist = []
  # X, Yの辺がない場合
  for i in range(N):
    dist.append(abs(origin - i))
  # X, Yの辺がある場合
  if dist[X] < dist[Y]:
    dist[Y] = dist[X] + 1
  elif dist[Y] < dist[X]:
    dist[X] = dist[Y] + 1
  for i in range(N):
    if i - 1 >= 0:
      dist[i] = min(dist[i], dist[i-1]+1)
    if i + 1 < N:
      dist[i] = min(dist[i], dist[i+1]+1)
  for i in reversed(range(N)):
    if i - 1 >= 0:
      dist[i] = min(dist[i], dist[i-1]+1)
    if i + 1 < N:
      dist[i] = min(dist[i], dist[i+1]+1)
  #print(*dist)
  return dist

count = [0 for i in range(N)]
for i in range(N):
  dist = search(i)
  for dis in dist:
    count[dis] += 1

for i in range(1, N):
  print(count[i]//2)

### FIXED CODE ###

N, X, Y = list(map(int, input().split(' ')))
X -= 1
Y -= 1
dist_map = {}

def search(origin):
  dist = []
  # X, Yの辺がない場合
  for i in range(N):
    dist.append(abs(origin - i))
  # X, Yの辺がある場合
  if dist[X] < dist[Y]:
    dist[Y] = dist[X] + 1
  elif dist[Y] < dist[X]:
    dist[X] = dist[Y] + 1
  for i in range(N):
    if i - 1 >= 0:
      dist[i] = min(dist[i], dist[i-1]+1)
    if i + 1 < N:
      dist[i] = min(dist[i], dist[i+1]+1)
  for i in reversed(range(N)):
    if i - 1 >= 0:
      dist[i] = min(dist[i], dist[i-1]+1)
    if i + 1 < N:
      dist[i] = min(dist[i], dist[i+1]+1)
  #print(*dist)
  return dist

count = [0 for i in range(N)]
for i in range(N):
  dist = search(i)
  for dis in dist:
    count[dis] += 1

for i in range(1, N):
  print(count[i]//2)
### BUGGY CODE ###

import numpy as np
from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
from scipy.sparse import csr_matrix, lil_matrix
import sys
input = sys.stdin.readline
n,m,s,t = map(int, input().split())
money = lil_matrix((n+1, n+1), dtype = int)
snu = lil_matrix((n+1, n+1), dtype = int)
for i in range(m):
    u,v,a,b = map(int, input().split())
    money[u,v] = money[v,u] = a
    snu[u,v] = snu[v,u] = b
money = dijkstra(money)
snu = dijkstra(snu)
start = 10**15
#何年目か？
for i in range(n):
    ans = 0
    #i年目なので、iまででは両替出来ない。両替する場所を探す
    for j in range(i+1,n+1):
        ans = max(ans, start - (money[s][j] + snu[j][t]))
    print(int(ans))

### FIXED CODE ###

import numpy as np
import sys
from heapq import heappush, heappop
input = sys.stdin.readline
def dijkstra(start, mode):
    INF = 10 ** 15
    dist = [INF] * (n+1)
    dist[start] = 0
    q = [(0,start)]
    while q:
        d,v = heappop(q)
        if dist[v] < d:
            continue
        for w,*a in graph[v]:
            d1 = d + a[mode]
            if dist[w] > d1:
                dist[w] = d1
                heappush(q, (d1,w))
    return dist

n,m,s,t = map(int, input().split())
graph = [[] for i in range(n+1)]
for i in range(m):
    u,v,a,b = map(int, input().split())
    graph[u].append([v,a,b])
    graph[v].append([u,a,b])
money = dijkstra(s,0)
snu = dijkstra(t,1)
start = 10**15
#何年目か？
ans = []
ans_max = 10**15
for j in range(n,-1,-1):
    ans_max = min(ans_max, (money[j] + snu[j]))
    ans.append(ans_max)
for i in range(n-1,-1,-1):
    print(int(start - ans[i]))
### BUGGY CODE ###

def ABC_169_B():
    N=int(input())
    A = input().split()
    A = [int(s) for s in A]
    sum=1

    for i in range(len(A)):
        sum=sum*A[i]
    if sum>10**18:
        print('-1')
    else:
        print(sum)


if __name__ == '__main__':

    ABC_169_B()

### FIXED CODE ###

N = int(input())
A = [int(x) for x in input().split()]

reg = A[0]
flg=True
if 0 in A:
    print(0)
    flg=False
    reg=0
for i in range(1, N):
    reg *= A[i]
    if reg>10**18:
        print(-1)
        flg=False
        break
if flg:
    print(reg)
### BUGGY CODE ###

import bisect
import array

n, m = map(int, input().split())
a = map(int, input().split())
a = array.array("L", sorted(list(a)))
for _ in range(m):  # O(m*n)
    max_num = a.pop()  # O(1)
    index = bisect.bisect(a, max_num // 2)  # O(log n)
    a.insert(index, max_num // 2)  # O(n)
print(sum(a))

### FIXED CODE ###

class heap():
    def __init__(self, maxcom=True):
        if maxcom:
            self.compare = lambda x, y: x > y
        else:
            self.compare = lambda x, y: x < y

    def heappush(self, x, heap):
        heap.append(x)
        length = len(heap)
        pointer = length
        while True:
            if pointer == 1:
                break
            if self.compare(heap[pointer - 1], heap[(pointer >> 1) - 1]):
                heap[pointer - 1], heap[(pointer >> 1) - 1] = heap[(pointer >> 1) - 1], heap[pointer - 1]
                pointer = pointer >> 1
            else:
                break

    def heapreplace(self, function, heap):
        heap[0] = function(heap[0])
        pointer = 1
        length = len(heap)
        while True:
            if (pointer << 1) > length:
                break
            elif (pointer << 1) + 1 > length :
                if self.compare(heap[(pointer << 1) - 1], heap[pointer - 1]):
                    heap[(pointer << 1) - 1], heap[pointer - 1] = heap[pointer - 1], heap[(pointer << 1) - 1]
                else:
                    break
            else:
                if self.compare(heap[(pointer << 1) - 1], heap[pointer << 1]):
                    next_pointer = pointer << 1
                else:
                    next_pointer = (pointer << 1) + 1
                if self.compare(heap[next_pointer - 1], heap[pointer - 1]):
                    heap[next_pointer - 1], heap[pointer - 1] = heap[pointer - 1], heap[next_pointer - 1]
                    pointer=next_pointer
                else:
                    break


n, m = map(int, input().split())
a = map(int, input().split())
heapq = []
heapc=heap(True)
for i in a:
    heapc.heappush(i,heapq)
for _ in range(m):
    heapc.heapreplace(lambda x:x>>1,heapq)
print(sum(heapq))
### BUGGY CODE ###

S = [int(e) for e in input().split()]
list_a =  [int(e) for e in input().split()]
list_b =  [int(e) for e in input().split()]

dis_list = []

for i in range(S[2]):
    dis_list.append([int(e) for e in input().split()])

cost_list = []

for i in list_a:
    for j in list_b:
        cost_list.append(i+j)


for l in dis_list:
    cost_list.append(cost_list[S[0]*(l[0]-1)+l[1]-1] - l[2])

min_num = cost_list[0]

for i in cost_list:
    if i < min_num:
        min_num = i

print(min_num)


### FIXED CODE ###

S = [int(e) for e in input().split()]
list_a =  [int(e) for e in input().split()]
list_b =  [int(e) for e in input().split()]

dis_list = []

for i in range(S[2]):
    dis_list.append([int(e) for e in input().split()])

min_num1 = min(list_a) + min(list_b)

min_num2_list = []

for l in dis_list:
    min_num2_list.append(list_a[l[0]-1] + list_b[l[1]-1] - l[2])

min_num2 = min(min_num2_list)

if min_num1 > min_num2:
    print(min_num2)
else:
    print(min_num1)
### BUGGY CODE ###

import sys
input = sys.stdin.readline

def main():
    N = int(input())
    S = input()
    ans = 0
    for i in range(N-1):
        for j in range(i+1, N):
            if S[i] == S[j]:
                continue
            c = 'RGB'.replace(S[i], '')
            c = c.replace(S[j], '')
            ans += S[j+1:].count(c)
            if 2*j - i < N and S[2*j-i] == c:
                ans -= 1
    print(ans)

main()

### FIXED CODE ###

from collections import Counter
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    S = input()
    ans = 0
    r, g, b = [0 for _ in range(N+1)], [0 for _ in range(N+1)], [0 for _ in range(N+1)]
    for i in range(N):
        r[i+1], g[i+1], b[i+1] = r[i], g[i], b[i]
        if S[i] == "R":
            r[i+1] += 1
        elif S[i] == "G":
            g[i+1] += 1
        else:
            b[i+1] += 1
    
    for i in range(1, N-1):
        if S[i] == "R":
            ans += g[i] * (b[N] - b[i+1]) + b[i] * (g[N] - g[i+1])
            for j in range(1, min(i, N-i-1)+1):
                if {S[i-j], S[i+j]} == {"G", "B"}:
                    ans -= 1
        
        elif S[i] == "G":
            ans += r[i] * (b[N] - b[i+1]) + b[i] * (r[N] - r[i+1])
            for j in range(1, min(i, N-i-1)+1):
                if {S[i-j], S[i+j]} == {"R", "B"}:
                    ans -= 1
        elif S[i] == "B":
            ans += g[i] * (r[N] - r[i+1]) + r[i] * (g[N] - g[i+1])
            for j in range(1, min(i, N-i-1)+1):
                if {S[i-j], S[i+j]} == {"G", "R"}:
                    ans -= 1
    print(ans)

main()
### BUGGY CODE ###

n, k, q = map(int, input().split())
a = []
for _ in range(q):
    a.append(int(input()))

for i in range(n):
    num = 0
    for  cp in a:
        if cp == i + 1:
            num += 1
    if k <= q - num:
        print("No")
    else:
        print("Yes")

### FIXED CODE ###

n, k, q = map(int, input().split())
a = [0] * n

for _ in range(q):
    a[int(input()) - 1] += 1

for i in range(n):
    if k - (q - a[i]) > 0:
        print('Yes')
    else:
        print('No')
### BUGGY CODE ###

k, s = map(int, input().split())
cnt = 0
ls = [z for z in range(k+1)]
for x in range(k+1):
    for y in range(k+1):
        if s - x - y in ls:
            cnt += 1
print(cnt)


### FIXED CODE ###

k, s = map(int, input().split())
cnt = 0
for x in range(k+1):
    for y in range(k+1):
        if 0 <= s-x-y <= k:
            cnt += 1
print(cnt)
### BUGGY CODE ###

import sys
input = sys.stdin.readline
N, M = map(int, input().split())
A = [int(x) for x in input().split()]
list.sort(A, reverse=True)

for _ in range(M):
    A[0] //= 2
    list.sort(A, reverse=True)

print(sum(A))

### FIXED CODE ###

import sys
import heapq

input = sys.stdin.readline
N, M = map(int, input().split())

A = []
for x in input().split():
    heapq.heappush(A, int(x) * (-1))

for _ in range(M):
    max_n = heapq.heappop(A) * (-1)
    heapq.heappush(A, (max_n // 2) * (-1))
    
print(sum(A) * (-1))
### BUGGY CODE ###

N = int(input())
ans = []

for i in range(N):
    A = int(input())
    if A not in ans:
        ans.append(A)
    else:
        ans.remove(A)
        
print(len(ans))

### FIXED CODE ###

from collections import Counter
N = int(input())
a = []
count = 0

for i in range(N):
    A = int(input())
    a.append(A)

c = Counter(a)
for i in c:
    if c[i] % 2 == 1:
        count += 1

print(count)
### BUGGY CODE ###

N = int(input())
a = [int(i) for i in input().split()]
a.sort()
A = 1
if a[0] == 0:
    A = 0
else: 
    for i in range(N):
        A = A * a[i]
if A > 1000000000000000000:
    print(-1)
else:
    print(A)

### FIXED CODE ###

N = int(input())
a = [int(i) for i in input().split()]
A = 1
if 0 in a:
  print(0)
  exit()
for i in range(N):
  A = A * a[i]
  if A > 1000000000000000000:
    print(-1)
    exit()
print(A)
### BUGGY CODE ###

N=int(input())
A = list(map(int,input().split()))	


Money=1000
Kabu=0

for i in range(N-1):
  if A[i]<A[i+1]:
    while True:
      if Money-A[i]>=0:
        Money-=A[i]
        Kabu+=1
      else:
        break
  if A[i]>A[i+1]:
    while True:
      if Kabu>0:
        Money+=A[i]
        Kabu-=1
      else:
        break

if Kabu>0:
  Money+=Kabu*A[-1]

print(Money)

### FIXED CODE ###

import math

N=int(input())
A = list(map(int,input().split()))	

Money=1000
Kabu=0

def MoneyWar(Money,Kabu,A,N):
  for i in range(N-1):
    if A[i]<A[i+1]:
      Kounyu=math.floor(Money/A[i])
      Money-=A[i]*Kounyu
      Kabu+=Kounyu

    if A[i]>A[i+1]:
      Money+=Kabu*A[i]
      Kabu=0

      
  if Kabu>0:
    Money+=Kabu*A[-1]
    
  return Money

print(MoneyWar(Money,Kabu,A,N))