Harryxun/stf_run huggingface dataset:
N = int(input())
a = list(map(int, input().split()))
count = 1
if 0 in a:
  print(0)
else:
  for i in range(N):
    count *= a[i]
    if ans > 10 ** 18:
      print(-1)
      break
  else:
    print(count)

### FIXED CODE ###

N = int(input())
a = list(map(int, input().split()))
ans = 1
if 0 in a:
  print(0)
else:
  for i in range(N):
    ans *= a[i]
    if ans > 10 ** 18:
      print(-1)
      break
  else:
    print(ans)
abc119d
import bisect

a,b,q=map(int,raw_input().split())
inf=2<<60
s=[-inf]+[int(raw_input()) for i in xrange(a)]+[inf]
t=[-inf]+[int(raw_input()) for i in xrange(b)]+[inf]
for i in xrange(q):
 x=int(raw_input())
 b=bisect.bisect_right(s,x)
 d=bisect.bisect_right(t,x)
 res=inf
 for ss in [s[b-1],s[b]]:
  for tt in [t[d-1],t[d]]:
   d1=abs(ss-x)+abs(tt-ss)
   d2=abs(tt-x)+abs(ss-tt)
   res=min(res,d1,d2)
 print res


### FIXED CODE ###

#abc119d
import bisect

a,b,q=map(int,raw_input().split())
inf=2<<60
s=[-inf]+[int(raw_input()) for i in xrange(a)]+[inf]
t=[-inf]+[int(raw_input()) for i in xrange(b)]+[inf]
s.sort()
t.sort()
for i in xrange(q):
 x=int(raw_input())
 b=bisect.bisect(s,x)
 d=bisect.bisect(t,x)
 res=inf
 for ss in [s[b-1],s[b]]:
  for tt in [t[d-1],t[d]]:
   d1=abs(ss-x)+abs(tt-ss)
   d2=abs(tt-x)+abs(ss-tt)
   res=min(res,d1,d2)
 print res
N = int(input())
for i in range(round(N/4) + 2):
  for j in range(round(N/7) + 2):
	if 4*i + 7*j == N:
	  print("Yes")
	  break

### FIXED CODE ###

N = int(input())
fmax = int(N/4)+1
smax = int(N/7)+1
for i in range(fmax+1):
  for j in range(smax+1):
    if (4*i+7*j) == N:
      print('Yes')
      exit()
print('No')
import numpy as np
H, W = map(int, input().split())
N = int(input())
a = list(map(int, input().split()))

m = np.argsort(a)[::-1]
n = [str(i+1) for i in m]
c = [a[i] for i in m]

ans = ["" for _ in range(H)]
j = 0
for i in range(H):
    count = 0
    while count != W:
        if count + c[i] <= W:
            ans[i] += n[j] * c[j]
            count += c[j]
            j += 1
        else:
            count = W - count
            ans[i] += n[j] * count
            c[j] -= count 
            count = W

for i in range(H):
    if i % 2 == 0:
        print(" ".join(ans[i][::-1]))
    else:
        print(" ".join(ans[i]))

### FIXED CODE ###

H, W = map(int, input().split())
N = int(input())
a = list(map(int, input().split()))
ans = []
for i in range(N):
  ans.extend([i+1 for _ in range(a[i])])
ans = [ans[i:i+W] for i in range(0, H*W, W)]
for i in range(1, H, 2):
  ans[i] = ans[i][::-1]
for r in ans:
  print(' '.join(map(str,r)))
N, S = int(input()), list(input())

S_set = set(S)
ans = 0
for num in range(0, 1000):
    n0, n1, n2 = list(str(num).zfill(3))
    if n0 in S_set and n1 in S_set and n2 in S_set:
        idx0 = S.idx(n0)
        idx2 = N - S[::-1].idx(n2) - 1
        if idx0 < idx2:
            if n1 in S[idx0 + 1: idx2]:
                ans += 1
print(ans)

### FIXED CODE ###

def canMakeNumber(k, s):
    k = str(k).zfill(3)
    dic = {0: False, 1: False, 2: False}
    rep = False
    for t in s:
        if dic[0] is False:
            if t == k[0]:
                dic[0] = True
        else:
            if dic[1] is False:
                if t == k[1]:
                    dic[1] = True
            else:
                if dic[2] is False:
                    if t == k[2]:
                        dic[2] = True
                else:
                    continue
    if dic[0] == dic[1] == dic[2] == True:
        rep = True
    return rep


N = int(input())
S = input()
ans = 0
for i in range(0, 1000):
    if canMakeNumber(i, str(S)):
        ans += 1
print(ans)
from collections import Counter
n=int(input())
s=[input() for i in range(n)]
s=Counter(s)
p=[]
p.append(s.most_common()[0][0])
for i in range(n-2):
    if s.most_common(i+1)[i][1]==s.most_common(i+2)[i+1][1]:
        p.append(s.most_common(i+2)[i+1][0])
    else:
        break
p=sorted(p)
for i in range(len(p)):
    print(p[i])

### FIXED CODE ###

import collections
from collections import Counter
n=int(input())
s=[input() for i in range(n)]
s=Counter(s)
p=[]
k=s.most_common()
p.append(k[0][0])
for i in range(len(collections.Counter(s))-1):
    if k[i][1]==k[i+1][1]:
        p.append(k[i+1][0])
    else:
        break
p=sorted(p)
for i in range(len(p)):
    print(p[i])
s = input()
t = []
for x in s:
  if x =="B":
    try:t.pop()
    except:pass
  else:
    t.append(x)
print("".joint(t))
  

### FIXED CODE ###

s = input()
t = []
for x in s:
  if x =="B":
    try:t.pop()
    except:pass
  else:
    t.append(x)
print("".join(t))
H, W = map(int, input().split())
S = [list(input()) for i in range(H)]

C = 0
for i in range(H):
  for j in range(W):
    if S[i][j] == ".":
      C += 1

S[0][0] = 0
for i in range(H):
  for j in range(W):
    if S[i][j] != "#":     
      for k in [[0,1],[1,0],[-1,0],[0,-1]]:
        if not(0 <= i + k[0] < H):
          continue
        elif not(0 <= j + k[1] < W):
          continue
        elif S[i+k[0]][j+k[1]] != ".":
          continue
        else:
          S[i+k[0]][j+k[1]] = S[i][j]+1
        
if S[H-1][W-1] == ".":
  print(-1)
  exit()
  
ans = C - S[H-1][W-1] -1
print(ans)

### FIXED CODE ###

H, W = map(int, input().split())
S = [list(input()) for i in range(H)]

C = 0
for i in range(H):
  for j in range(W):
    if S[i][j] == ".":
      C += 1
    
S[0][0] = 0
for l in range(C-1):
  for i in range(H):
    for j in range(W):
      if S[i][j] == l:     
        for k in [[0,1],[1,0],[-1,0],[0,-1]]:
          if not(0 <= i + k[0] < H):
            continue
          elif not(0 <= j + k[1] < W):
            continue
          elif S[i+k[0]][j+k[1]] != ".":
            continue
          else:
            S[i+k[0]][j+k[1]] = S[i][j]+1
        
if S[H-1][W-1] == ".":
  print(-1)
  exit()
  
ans = C - S[H-1][W-1] -1
print(ans)
x = ( a * b )

if x % 2 == 0:
    print("Even")
if x % 2 != 0:
    print("odd")


### FIXED CODE ###

a, b = map(int, input().split())
answer = a * b
if answer % 2 == 0:
    print('Even')
else:
    print('Odd')
n = int(input())
lis = [list(map(int,input().split())) for i in range(n)]
ans = []
for x in range(101):
  for y in range(101):
    co = abs(x -lis[0][0])+abs(y -lis[0][1])+lis[0][2]
    for j in range(n):
      if co != abs(x -lis[j][0])+abs(y -lis[j][1])+lis[j][2]:
        break
      if j == n-1:
        ans.append([x,y,co])
print(ans[0][0],ans[0][1],ans[0][2])

### FIXED CODE ###

n = int(input())
lis = []
for i in range(n):
  a = list(map(int,input().split()))
  if a[2] != 0:lis.append(a)
if len(lis) == 1:
  print(lis[0][0],lis[0][1],lis[0][2])
  exit()
for x in range(101):
  for y in range(101):
    co = abs(x -lis[0][0])+abs(y -lis[0][1])+lis[0][2]
    for j in range(1,len(lis)):
      if co != abs(x -lis[j][0])+abs(y -lis[j][1])+lis[j][2]:
        break
      if j == len(lis)-1:
        print(x,y,co)
        exit()
D, N = map(int,input().split())
if N <= 99:
    print((100*D)*N)
else:
    print((100**D)*(N+1)))


### FIXED CODE ###

D, N = map(int,input().split())
if N == 100:
    print((100**D)*(N+1))
else:
    print((100**D)*N)
import numpy as np
from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
from scipy.sparse import csr_matrix

n,x,y = map(int,input().split())
graph = [[0 for i in range(n)]for j in range(n)]

for i in range(n-1):
    graph[i][i+1] = 1
    graph[i+1][i] = 1
    
graph[x-1][y-1] = 1
graph[y-1][x-1] = 1

ans = shortest_path(np.array(graph))
u, counts = np.unique(ans, return_counts=True)

for i in range(1,n):
    if i in u:
        print(int(counts[np.where(u==i)[0][0]]/2))
    else:print(0)

### FIXED CODE ###

n,x,y = map(int,input().split())
ans = [0]*n
for i in range(1,n+1):
    for j in range(i+1,n+1):
        ans[min(abs(i-j) , abs(i-x)+1+abs(j-y), abs(i-y)+1+abs(j-x)) ]+=1
        
for i in range(1,n):
    print(ans[i])
n = input().split()
num = [0 for i in range(len(n))]
for i in range(len(n)):
    num[i] = int(n[i])
for i in reversed(range(len(num))):
    for j in range(i):
    ¦   if num[j] > num[j + 1]: 
    ¦   ¦   tmp = num[j]
    ¦   ¦   num[j] = num[j + 1]  
    ¦   ¦   num[j + 1] = tmp 
for i in range(len(n)):
    print(str(num[i]),end=" ")


### FIXED CODE ###

n = input().split()
num = [0 for _ in range(len(n))]
for i in range(len(n)):
    num[i] = int(n[i])
for i in (reversed(range(len(n)))):
    for j in range(i):
        if num[j] > num[j + 1]:
            tmp = num [j + 1]
            num[j + 1] = num[j]
            num[j] = tmp
print(str(num[0])+" "+str(num[1])+" "+str(num[2]))
a,b=map(int,input.split())
s=max([a+b,a-b,a*b])
print(s)

### FIXED CODE ###

import numpy as np
a,b=map(int,input().split())
s=np.max([a+b,a-b,a*b])
print(s)
a,b =[int(i) for i in input().split()]

d = a / b
r = a % b
f = a // b

print(d r f)

### FIXED CODE ###

a, b = [int(i) for i in input().split()]
 
d = a // b
r = a % b
f = a / b
 
print("{0} {1} {2:.5f}".format(d, r, f))
x = int().input()
a = int().input()
b = int().input()
print((x - a) % b)

### FIXED CODE ###

x = int(input())
a = int(input())
b = int(input())
print((x - a) % b)
M, K = map(int, input().split())

if K >= 2 ** M:
    print(-1)
elif K == 0:
    ans = []
    x = range(0, 2 ** M)
    y = range(0, 2 ** M)
    for xx, yy in zip(x, y):
        ans.append(xx)
        ans.append(yy)
    print(*ans)
else:
    t = 0
    for i in range(1, 2 ** M):
        if i == K: continue
        t ^= i
    if t == K:
        x = [i for i in range(0, 2 ** M) if i != K]
        ans = [K] + x + [K] + reversed(x)
        print(*ans)
    else:
        print(-1)


### FIXED CODE ###

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

if K >= 2 ** M:
    print(-1)
elif K == 0:
    ans = []
    x = range(0, 2 ** M)
    y = range(0, 2 ** M)
    for xx, yy in zip(x, y):
        ans.append(xx)
        ans.append(yy)
    print(*ans)
else:
    t = 0
    for i in range(1, 2 ** M):
        if i == K: continue
        t ^= i
    if t == K:
        x = [i for i in range(0, 2 ** M) if i != K]
        ans = [K] + x + [K] + list(reversed(x))
        print(*ans)
    else:
        print(-1)
def read(): return list(map(int, input().split()))


h, w = read()
n = int(input())
A = read()

s = ""
for i, a in enumerate(A):
    s += str(i + 1) * a

assert len(s) == h * w

for i in range(h):
    out = s[i * w: i * w + w]
    if i & 1:
        out = out[::-1]

    print(" ".join(out))

### FIXED CODE ###

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


h, w = read()
n = int(input())
A = read()

s = []
for i, a in enumerate(A):
    for j in range(a):
        s.append(str(i + 1))

for i in range(h):
    out = s[i * w: i * w + w]
    if i & 1:
        out = list(reversed(out))

    print(" ".join(out))
N=int(input())
matchNums=input().split(" ")
matchNums=list(map(int, matchNums))
plus_flgs=[]

if len(matchNums)==1:
    print("Yes")
    
else:
    check_array=[]
    check_array_all=[]
    
    for i in range(len(matchNums)-1):
        check_array.append((matchNums[i+1] - matchNums[i]))
    
#     for i in range(len(check_array)-1):
#         check_array_all.append((check_array[i+1] + check_array[i]))
    #プラスとプラスの間を足す
    #プラスのinedex取得
    for i,val in enumerate(check_array):
        if val > 0:
            plus_flgs.append(i)
    
    # 最後がマイナスで終わるとき対策
    plus_flgs.append(len(check_array))
    for i in range(len(plus_flgs)-1):
        check_array_all.append(sum(check_array[plus_flgs[i]+1: plus_flgs[i+1]]))
    
    # 微分値が2の物があったらＮＧ
    if max(check_array[:-1])>1 or min(check_array[:-1])<-1:
        print("No")
    else:
        if min(check_array_all)<-1:
            print("No")
        else:
            print("Yes")

### FIXED CODE ###

N=int(input())
matchNums=input().split(" ")
matchNums=list(map(int, matchNums))
plus_flgs=[-1]

if len(matchNums)==1:
    print("Yes")
    
else:
    check_array=[]
    check_array_all=[]
    
    for i in range(len(matchNums)-1):
        check_array.append((matchNums[i+1] - matchNums[i]))
    
#     for i in range(len(check_array)-1):
#         check_array_all.append((check_array[i+1] + check_array[i]))
    #プラスとプラスの間を足す
    #プラスのinedex取得
    for i,val in enumerate(check_array):
        if val > 0:
            plus_flgs.append(i)
    
    # 最後がマイナスで終わるとき対策
    plus_flgs.append(len(check_array))
#     print(plus_flgs)
#     print(check_array)
    for i in range(len(plus_flgs)-1):
        check_array_all.append(sum(check_array[plus_flgs[i]+1: plus_flgs[i+1]]))
#     print(check_array_all)
    # プラスとプラスの間の和が-2の物があったらＮＧ
    if min(check_array_all)<-1:
        print("No")
    else:
        print("Yes")
N, M = map(int, input().split())
l = []
for i in range(M):
  	l.append(list(map(int, input().split())))

def FillZero(num,f=6):
    s = ""
    s += (f - len(str(num))) * "0"
    s += str(num)
    return(s)

for i in range(M):
    l[i].append(i)

l = sorted(l, key = lambda x:(x[0],x[1]))

key0 = l[0][0]
key1 = 0
for i in range(M):
    if key0 == l[i][0]:
      	key1 += 1
        l[i][1] = key1
    else:
        key1 = 1
        l[i][1] = key1
        key0 += 1

l = sorted(l, key = lambda x:x[2])

for i in range(M):
    print(FillZero(l[i][0]) + FillZero(l[i][1]))

### FIXED CODE ###

N, M = map(int, input().split())
l = []
for i in range(M):
  	l.append(list(map(int, input().split())))

def FillZero(num,f=6):
    s = ""
    s += (f - len(str(num))) * "0"
    s += str(num)
    return(s)

for i in range(M):
    l[i].append(i)

l = sorted(l, key = lambda x:(x[0],x[1]))

key0 = l[0][0]
key1 = 0
for i in range(M):
    if key0 == l[i][0]:
        key1 += 1
        l[i][1] = key1
    else:
        key1 = 1
        l[i][1] = key1
        key0 = l[i][0]

l = sorted(l, key = lambda x:x[2])

for i in range(M):
    print(FillZero(l[i][0]) + FillZero(l[i][1]))
a, b = [int(i) for i in input().split()]
c = b-a
d = 0
for j in range(c):
    d+=j
d-=a
print(d)

### FIXED CODE ###

N = int(input())
if N<1000:
    print("ABC")
else:
    print("ABD")
S = int(input())
h = S//3600
m = (S%3600)//60
s = S%m
print(h:m:s)

### FIXED CODE ###

S = int(input())
s = S%60
h = S//3600
m = (S%3600)//60
print("{}:{}:{}".format(h,m,s))
n = int(input())
x = input()

def p(x):
    return x.count('1')

# p(n)は高々2*10^5

from functools import lru_cache

@lru_cache(maxsize=None)
def f(n, k):
    b = bin(n) # binary str
    q = p(b[2:]) # 1の個数
    if n % q == 0:
        return k
    else:
        return f(n % q, k + 1)

cnt = p(x)
for i in range(n):
    if x[i] == '0':
        y = x[:i] + '1' + x[i + 1:]
    else:
        y = x[:i] + '0' + x[i + 1:]
    print(f(int(y, 2), 1))

### FIXED CODE ###

n = int(input())
x = input()

original_pop_count = x.count('1')
one_pop_count = original_pop_count - 1 # 0になりうる
zero_pop_count = original_pop_count + 1

one_mod = 0
zero_mod = 0
for b in x:
    if one_pop_count != 0:
        one_mod = (one_mod * 2 + int(b)) % one_pop_count
    zero_mod = (zero_mod * 2 + int(b)) % zero_pop_count

# f の前計算
f = [0] * 220000
pop_count = [0] * 220000
for i in range(1, 220000):
    pop_count[i] = pop_count[i // 2] + i % 2
    f[i] = f[i % pop_count[i]] + 1

# pow2 の前計算
one_pow2 = [1] * 220000
zero_pow2 = [1] * 220000
for i in range(1, 220000):
    if one_pop_count != 0:
        one_pow2[i] = one_pow2[i - 1] * 2 % one_pop_count
    zero_pow2[i] = zero_pow2[i - 1] * 2 % zero_pop_count

for i in range(n-1, -1, -1):
    if x[n-i-1] == '1':
        if one_pop_count != 0:
            nxt = one_mod
        # nxt -= pow(2, i, one_pop_count)
            nxt -= one_pow2[i]
            nxt %= one_pop_count
            print(f[nxt] + 1)
        else:
            print(0)
    elif x[n-i-1] == '0':
        nxt = zero_mod
        # nxt += pow(2, i, zero_pop_count)
        nxt += zero_pow2[i]
        nxt %= zero_pop_count
        print(f[nxt] + 1)
n = int(input())
h = list(map(int,input().split()))

res = []
count = 0
for i in range(n-1):
  if h[i] >= h[i+1]:
    count += 1
    if i == (n-2):
      res.append(count)
  else:
    res.append(count)
    count = 0

      
print(max(res))

### FIXED CODE ###

n = int(input())
h = list(map(int,input().split()))

res = []
count = 0
for i in range(n-1):
  if h[i] >= h[i+1]:
    count += 1
    if i == (n-2):
      res.append(count)
  else:
    if count != 0: 
      res.append(count)
    count = 0

if len(res) == 0:
  print(0)
else:
  print(max(res))
s = [input() for _ in range(int(input()))]
t = [input() for _ in range(int(Input()))]

print(max(0,max(s.count(s[i]) - t.count(s[i]) for i in range(len(S)))))

### FIXED CODE ###

s = [input() for _ in range(int(input()))]
t = [input() for _ in range(int(input()))]

print(max(0,max(s.count(s[i]) - t.count(s[i]) for i in range(len(s)))))
# -*- coding: utf-8 -*-
# 18:01 -> 
from collections import deque

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

H, W = map(int, input().split())

A = []
first_black = []

for i in range(H):
    A.append(list(input()))
    first_black.extend([(i,j) for j in range(W) if A[i][j] == '#'])

for x,y in first_black:
    A[x][y] = 0

black_deque = deque()
black_deque.extend(first_black)

max_depth = 0
while len(black_deque) != 0:
    x,y = black_deque.popleft()
    depth = A[x][y]
    max_depth = max(max_depth, depth)
    for k in range(4):
        new_x = x+dx[k]
        new_y = y+dy[k]
        if A[new_x][new_y] == '.' and \
           0 <= new_x < H and \
           0 <= new_y < W:
            black_deque.append((new_x, new_y))
            A[new_x][new_y] = depth+1

print(depth)

### FIXED CODE ###

# -*- coding: utf-8 -*-
# 18:01 -> 18:36 (give up. TLE)
from collections import deque

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

H, W = map(int, input().split())

A = []
black_deque = deque()

for i in range(H):
    A.append(list(input()))
    black_deque.extend([(i,j) for j in range(W) if A[i][j] == '#'])

if len(black_deque) == H*W:
    print(0)
    exit(0)

for x,y in black_deque:
    A[x][y] = 0

while len(black_deque) != 0:
    x,y = black_deque.popleft()
    depth = A[x][y]
    for k in range(4):
        new_x = x+dx[k]
        new_y = y+dy[k]
        if 0 <= new_x < H and \
           0 <= new_y < W and \
           A[new_x][new_y] == '.':
            black_deque.append((new_x, new_y))
            A[new_x][new_y] = depth+1

print(depth)
N = int(input())
A =[i for i in map(int, input().split())]

if a.count(0) != 0:
    print(0)
else:
    result = 1
    for i in range(N):
        result *= A[i]
        if result > (10**18):
            print(-1)
            break
        else:
            continue
print(result)

### FIXED CODE ###

n = int(input())
a = [i for i in map(int, input().split())]
 
if a.count(0) != 0:
  print(0)
else:
  result = 1
  for i in range(n):
    result *= a[i]
    if result > (10**18):
      print(-1)
      break
    else:
      continue
  else:
    print(result)
for i in range(6):
  box[i]=int(input())
flag=0
for i in range(4):
  if (box[i]-box[i+1]) > box[5]:
    flag = 1 #直接通信ができない
  	break
if flag==1:
  print(':(')
else:
  print('Yay!')


### FIXED CODE ###

box=[]
for i in range(6):
  box.append(int(input()))
flag=0
if box[4]-box[0]>box[5]:
    print(':(')
else:
    print('Yay!')
s = input()

if s == "SUN":
  return 7
if s == "MON":
  return 6
if s == "TUE":
  return 5
if s == "WED":
  return 4
if s == "THU":
  return 3
if s == "FRI":
  return 2
if s == "SAT":
  return 1


### FIXED CODE ###

s = input()


if s == "SUN":
    print(7)
if s == "MON":
    print(6)
if s == "TUE":
    print(5)
if s == "WED":
    print(4)
if s == "THU":
    print(3)
if s == "FRI":
    print(2)
if s == "SAT":
    print(1)
def mx(i):
    if i == 0: return 0
    else     : return (i+1)*i + mx(i-1)

def cns(ls,m,sm):
    global n, s
    count = 0
    if m == n:
        if sm == s: return 1
        else      : return 0
    elif s-mx(n-m+2) <= sm <= s:
        for i in range(9-m+1):
            rls = ls[:]
            k = rls.pop(i)
            count += cns(rls,m+1,sm+(m+1)*k)
        return count
    else: return 0

ls = [0,1,2,3,4,5,6,7,8,9]
while True:
    n, s = map(int, raw_input().split())
    if s > mx(n): print 0
    else        : print cns(ls,0,0)

### FIXED CODE ###

def mxmn(ls,m):
	global n
	s1,s2 = 0, 0
	for i in range(m):
		s1 += (n-i)*ls[-i-1]
		s2 += (n-i)*ls[i]
	return s1,s2

def f(ls,m,s):
	global n
	count = 0
	if m > 0:
		mx,mn = mxmn(ls,m)
		if mx < s or mn > s: return 0
		elif mx == s or mn == s: return 1
		for i in range(len(ls)):
			lls = ls[:]
			a = (n-m+1)*lls.pop(i)
			if s-a < 0:	break
			else: count += f(lls,m-1,s-a)
		return count
	else:
		return 1 if s == 0 else 0
			
ls = [i for i in range(10)]
while True:
	try:
		n,s = map(int, raw_input().split())
		print f(ls,n,s)
	except:
		break
n=int(input())
a=[]
for i in range(n):
  a.append(int(input()))
from collentions import Counter
b=list(Counter(a).values())
cnt=0
for i in range(len(b)):
  if b[i]%2==0:
    cnt+=1
print(cnt)


### FIXED CODE ###

n=int(input())
a=[]
for i in range(n):
  a.append(int(input()))
from collections import Counter
b=list(Counter(a).values())
cnt=0
for i in range(len(b)):
  if b[i]%2==1:
    cnt+=1
print(cnt)
n, m = map(int, input().split())
x = list(map(int, input().split()))
x.sort()

if n >= m:
    print(0)
    exit()
    
cost = []
for i in range(m-1):
    cost.append(x[i] - x[i+1])

l = sorted(cost)
ind = [0]
for i in range(n-1):
    ind.append(cost.index(l[i]) + 1)
ind.append(m)

X = []
for i in range(n):
    X.append(x[ind[i]:ind[i+1]])

ans = 0    
for i in X:
    ans += i[-1] - i[0]

print(ans)

### FIXED CODE ###

n, m = map(int, input().split())
x = list(map(int, input().split()))
x.sort()
if n >= m:
    print(0)
    exit()

cost = []
for i in range(m-1):
    cost.append(x[i+1] - x[i])

cost.sort()
ans = 0
for i in range(m-n):
    ans += cost[i]
print(ans)
N=int(input())
if N%2=1:
  a=N+1/2
  print(a)
else:
  b=N/2
  print(b)

### FIXED CODE ###

N=int(input())
if N%2==0:
  a=N/2
  b=a/N
  print(b)
else:
  t=N+1
  c=t/2
  d=c/N
  print(d)
import heapq

#入力:[n1,n2,...nk](int:整数配列)
def input_array():
	return list(map(int,input().split()))

n=int(input())
A=input_array()
sortA=sorted(A,reverse=True) #降順にソート

ans=0
q=[]
heapq.heappush(q,-sortA[0])

for i in range(1,n):
	tmp=heapq.heappop(q)
	tmp*=-1
	ans+=tmp
	heapq.heappush(q,-sortA[i])
	heapq.heappush(q,-sortA[i])
	print(q)
print(ans)

### FIXED CODE ###

import heapq

#入力:[n1,n2,...nk](int:整数配列)
def input_array():
	return list(map(int,input().split()))

n=int(input())
A=input_array()
sortA=sorted(A,reverse=True) #降順にソート

ans=0
q=[]
heapq.heappush(q,-sortA[0])

for i in range(1,n):
	tmp=heapq.heappop(q)
	tmp*=-1
	ans+=tmp
	heapq.heappush(q,-sortA[i])
	heapq.heappush(q,-sortA[i])
print(ans)
n = int(input())
print(n*(n + 1) // 2

### FIXED CODE ###

n = int(input())
ans = 0

for i in range(n + 1):
    ans += i

print(ans)
A,B = int(input()),int(input())
print('Yes' if A&B&1 else 'No)

### FIXED CODE ###

A,B = map(int,input().split())
print('Yes' if A&B&1 else 'No')
n=int(input())
a=list(map(int,input().split()))
 
count=0
ans=a[0]
for i in range(n):
  count=0
  while(a[i]%2==0):
    a[i]=a[i]//2
    count+=1
  ans=max(ans,count)
  
print(ans)

### FIXED CODE ###

n=int(input())
print(n%9)