Harryxun/stf_run huggingface dataset:
import bisect
import math

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

a.sort(reverse=True)

ans=[math.ceil(-a[0]/2)]
num = 0
now = 1

if n == 1:
    print(a[0] // 2**m)
    exit()
    
for i in range(m-1):
    #print(ans[0],a[now],now,ans)
    if now >= n:
        tmp = math.ceil(ans[0] / 2)
        idx = bisect.bisect_right(ans,tmp)
        #print(ans,idx,tmp)
        ans.insert(idx,tmp)
        del ans[0]
    if ans[0] <= -a[now]:
        tmp = math.ceil(ans[0] / 2)
        idx = bisect.bisect_right(ans,tmp)
        #print(ans,idx,tmp)
        ans.insert(idx,tmp)
        del ans[0]
    else:
        ans.append(math.ceil(-a[now]/2))
        now += 1
#print(ans,ans,ans,ans)
        
if len(ans) == len(a):
    print(-sum(ans))
    exit()
        
print(-sum(ans)+sum(a[len(ans):]))
exit()
for i in range(1,n):
 if num >= m:
   break
 if -a[i]>=ans[-1]: #i番目の要素がansの最小値以下であればansに付け加える
   ans.append(-a[i]//2)
   num+=1
 else:
   pos=bisect.bisect_right(ans,-a[i]) #i番目の要素以下の値で、最も大きい値の位置を求める
   ans[pos]=-a[i] #その位置の値をi番目の要素と置き換える

print(ans)
print(-sum(ans))
exit()

a = [-a]
print(a)
exit()

tmp = a[0] // 2

del a[0]

idx = bisect.bisect_right(a,tmp)
a.insert(idx,tmp)
print(a,idx)
exit()

if a[0] >= a[1]:
    a[0] = a[0] // 2
else:
    a[1] = a[1] // 2
    
print(a)

### FIXED CODE ###

import bisect
import math

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

a.sort(reverse=True)

ans=[math.ceil(-a[0]/2)]
num = 0
now = 1

if n == 1:
    print(a[0] // 2**m)
    exit()
    
for i in range(m-1):
    #print(ans[0],a[now],now,ans)
    if now >= n:
        tmp = math.ceil(ans[0] / 2)
        idx = bisect.bisect_right(ans,tmp)
        #print(ans,idx,tmp)
        ans.insert(idx,tmp)
        del ans[0]
        continue
    if ans[0] <= -a[now]:
        tmp = math.ceil(ans[0] / 2)
        idx = bisect.bisect_right(ans,tmp)
        #print(ans,idx,tmp)
        ans.insert(idx,tmp)
        del ans[0]
    else:
        ans.append(math.ceil(-a[now]/2))
        now += 1
#print(ans,ans,ans,ans)
        
if len(ans) == len(a):
    print(-sum(ans))
    exit()
        
print(-sum(ans)+sum(a[len(ans):]))
exit()
for i in range(1,n):
 if num >= m:
   break
 if -a[i]>=ans[-1]: #i番目の要素がansの最小値以下であればansに付け加える
   ans.append(-a[i]//2)
   num+=1
 else:
   pos=bisect.bisect_right(ans,-a[i]) #i番目の要素以下の値で、最も大きい値の位置を求める
   ans[pos]=-a[i] #その位置の値をi番目の要素と置き換える

print(ans)
print(-sum(ans))
exit()

a = [-a]
print(a)
exit()

tmp = a[0] // 2

del a[0]

idx = bisect.bisect_right(a,tmp)
a.insert(idx,tmp)
print(a,idx)
exit()

if a[0] >= a[1]:
    a[0] = a[0] // 2
else:
    a[1] = a[1] // 2
    
print(a)
from math import gcd
n, m = map(int, input().split())
s = input()
t = input()
if max(n, m) % min(n, m) == 0:
    print(-1)
else:
    print(n * m // gcd(n, m))


### FIXED CODE ###

from fractions import gcd
n, m = map(int, input().split())
s = list(input())
t = list(input())
i = 1
ans = n * m // gcd(n, m)
g = gcd(n, m)
for i in range(g):
    if s[i * n // g] != t[i * m // g]:
        ans = -1
        break
print(ans)
n, *l = open(0).read().split()
print("Yes" if len(set(l)) == len(l) and all(l[i][-1] == l[i+1][0] for i in range(n)) else "No")

### FIXED CODE ###

n, *l = open(0).read().split()
print("Yes" if len(set(l)) == len(l) and all(l[i][-1] == l[i+1][0] for i in range(int(n)-1)) else "No")
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
sys.setrecursionlimit(10**7)

def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

def comb(n):
    return int(n*(n-1)/2)

def main():
    N = I()
    A_list = LI()
    A_ctr = collections.Counter(A_list)
    for i in range(1,N+1):
        tmp_A_ctr = A_ctr.copy()
        tmp_A_ctr[A_list[i-1]] -= 1
        ans = 0
        for v in tmp_A_ctr.values():
            ans += comb(v)
        else:
            print(ans)

main()


### FIXED CODE ###

import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
sys.setrecursionlimit(10**7)

def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

def comb(n):
    return int(n*(n-1)/2)

def main():
    N = I()
    A_list = LI()
    A_ctr = collections.Counter(A_list)
    base = 0
    for i in range(1,N+1):
        base += comb(A_ctr[i])
    for i in range(1,N+1):
        i_val = A_ctr[A_list[i-1]]
        before = comb(i_val)
        after = comb(i_val-1)
        print(int(base - before + after))
main()
N = input()
A = list(map(int, input().split()))
count = 0
while all(a%2==0 for a in A):
    A = [a/2 for a in A]
    count += 1
print(cnt)

### FIXED CODE ###

N = input()
A = list(map(int, input().split()))
count = 0
while all(a%2==0 for a in A):
    A = [a/2 for a in A]
    count += 1
print(count)
N,K = map(int,input().split())
A = [0]+list(map(int,input().split()))
dp = [False]*(N+1)
tele = 0
# 同じものが出てきた時
for i in range(10**5):
    if i == 0:
        tele = 1
        dp[1] = True
    else:
        tele = A[tele]
        if dp[tele] == False:
            dp[tele] = True
        else:
            finish = i
            tele1 = tele
            break
tele = 0
# 始めてループの数が現れる時
for i in range(10**5):
    if i == 0:
        tele = 1
        if tele == tele1:
            start = i
            break
    else:
        tele = A[tele]
        if tele == tele1:
            start = i
            break
loop = finish-start
if K<start:
    ans = 0
    for i in range(K+1):
        if i==0:
            ans = 1
        else:
            ans = A[ans]
    print(ans)
else:
    ans = 0
    for i in range((K-start)%(finish-start)+1):
        if i == 0:
            ans = tele1
        else:
            ans = A[ans]
    print(ans)

### FIXED CODE ###

N,K = map(int,input().split())
A = [0]+list(map(int,input().split()))
dp = [False]*(N+1)
tele = 0
for i in range(10**6):
    if i==0:
        tele = 1
        dp[tele]=True
    else:
        tele = A[tele]
        if dp[tele]==True:
            finish = i
            tele1 = tele
            break
        else:
            dp[tele]=True
#print(finish)
#print(tele)
tele = 0
for i in range(10**6):
    if i == 0:
        tele = 1
        if tele == tele1:
            start = i
            break
    else:
        tele = A[tele]
        if tele == tele1:
            start = i
            break
#print(start)
loop = finish-start
if K<=start:
    ans = 1
    for i in range(K):
        ans = A[ans]
    print(ans)
else:
    ans = 1
    for i in range(start+(K-start)%loop):
        ans = A[ans]
    print(ans)
N, X, M = [int(x) for x in input().split()]

A = [0] * (M + 1)
firstApearAt = {i:0 for i in range(M)}
A[1] =  X
firstApearAt[X] = 1
l, r = 1, 1
for i in range(2, M + 1):
    A[i] = (A[i - 1] * A[i - 1]) % M
    if firstApearAt[A[i]] > 0:
        r = i
        l = firstApearAt[A[i]]
        break
    firstApearAt[A[i]] = i

ans = 0
if N <= l - 1:
    ans = sum(A[1:N + 1])
else:
    q, p = (N - l + 1) // (r - l), (N - l + 1) % (r - l)
    ans = sum(A[1:l]) + q * sum(A[l:r]) + sum(A[l:l + p])

print(ans)

### FIXED CODE ###

N, X, M = [int(x) for x in input().split()]

A = [0] * (M + 1)
firstApearAt = {i:0 for i in range(M)}
A[1] =  X
firstApearAt[X] = 1
l, r = 1, 2
for i in range(2, M + 1):
    A[i] = (A[i - 1] * A[i - 1]) % M
    if firstApearAt[A[i]] > 0:
        r = i
        l = firstApearAt[A[i]]
        break
    firstApearAt[A[i]] = i

ans = 0
if N <= l - 1:
    ans = sum(A[1:N + 1])
else:
    q, p = (N - l + 1) // (r - l), (N - l + 1) % (r - l)
    ans = sum(A[1:l]) + q * sum(A[l:r]) + sum(A[l:l + p])

print(ans)
n = int(input())
ls = list(map(int,input().split()))
a = 0
for i in range(n):
    for j in range(i):
        if ls[i] =< ls[j]:
            continue    
        else:
            a += 1
            break
print(n - a)


### FIXED CODE ###

n = int(input())
ls = list(map(int,input().split()))
min = ls[0]
k = 1
for i in range(1,n):
    if ls[i] < min:
        min = ls[i]
        k += 1
print(k)
import sys
from collections import deque

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

H, W = lr()
grid = [sr() for _ in range(H)]

def bfs(sy, sx):
    d = [[float('inf')] * W for _ in range(H)]
    dy = [0, 1, 0, -1]
    dx = [1, 0, -1, 0]
    que = deque()
    que.append((sy, sx))
    d[sy][sx] = 0
    while que:
        p = que.popleft()
        for i in range(4):
            ny = p[0] + dy[i]
            nx = p[1] + dx[i]                
            if 0 <= ny < H and 0 <= nx < W and \
                    grid[ny][nx] != '#' and d[ny][nx] == float('inf'):
                d[ny][nx] = d[p[0]][p[1]] + 1
                que.append((ny, nx))
    max = 0
    for row in d:
        for r in row:
            if r != float('inf') and r > max:
                max = r
    return max

answer = 0    
for i in range(H):
    for j in range(W):
        if S[i][j] == '#':
            continue
        result = bfs(i, j)
        if result > answer:
            answer = result

print(answer)
# 49


### FIXED CODE ###

import sys
from collections import deque
#import numpy as np

stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split())) # applies to numbers only
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces

H, W = rl()
grid = [list(rs()) for _ in range(H)]
INF = 1000

def bfs(sx, sy):
    d = [[INF] * W for _ in range(H)]
    dx = [1, 0, -1, 0]
    dy = [0, 1, 0, -1]

    que = deque()
    que.append((sx, sy))
    d[sy][sx] = 0
    while que:
        p = que.popleft()
        for i in range(4):
            nx = p[0] + dx[i]
            ny = p[1] + dy[i]                
            if 0 <= ny and ny <= H-1 and 0 <= nx and nx <= W-1 and \
                    grid[ny][nx] != '#' and d[ny][nx] == INF:
                d[ny][nx] = d[p[1]][p[0]] + 1
                que.append((nx, ny))
    dis = [[0 if x == INF else x for x in row] for row in d]
    return max([max(y) for y in dis])

answer = 0

for s in range(H):
    for t in range(W):
        if grid[s][t] == '#':
            continue
        distance = bfs(t, s)
        if distance > answer:
            answer = distance

print(answer)
import sys
import os
import math

f = open('input.txt', 'r')
sys.stdin = f
N=int(input())
p=[0]*5
for i in range(5):
    p[i]=int(input())

pmin=min(p)
g=math.ceil(N/pmin)
#g=int(N/pmin)
print(5+g-1)

### FIXED CODE ###

import sys
import os
#import math

N=int(input())
p=[0]*5
for i in range(5):
    p[i]=int(input())

pmin=min(p)
#g=math.ceil(N/pmin)
g=int(N/pmin)
if (N%pmin)==0:
    print(5+g-1)
else:
    print(5+g)
n=int(input())
s=[[]for i in range(n+1)]
g=[0]*(n+1)
h=[True]*(n+1)
for i in range(n-1):
    a,b,c=map(int,input().split())
    s[a].append([b,c])
    s[b].append([a,c])
def dfs(x):
    h[x]=False
    for i in s[x]:
        if h[i[0]]:
            g[i[0]]=g[x]+i[1]
            dfs(i[0])
q,k=map(int,input().split())
dfs(k)
for i in range(q):
    x,y=map(int,input().split())
    print(g[x]+g[y])

### FIXED CODE ###

import sys
sys.setrecursionlimit(10000000)
n=int(input())
s=[[]for i in range(n+1)]
g=[0]*(n+1)
h=[True]*(n+1)
for i in range(n-1):
    a,b,c=map(int,input().split())
    s[a].append([b,c])
    s[b].append([a,c])
def dfs(x):
    h[x]=False
    for i in s[x]:
        if h[i[0]]:
            g[i[0]]=g[x]+i[1]
            dfs(i[0])
q,k=map(int,input().split())
dfs(k)
for i in range(q):
    x,y=map(int,input().split())
    print(g[x]+g[y])
from numpy import *;i=int32;p=input;q=searchsorted;N=int(p());A=i(p().split());B=i(p().split());c=0;
for k in range(1,30):
  a,b=sort(hstack((A%(1<<k),A%(1<<k)-2**k))),B%(1<<k);c+=(sum(q(a,2**k-b)-q(a,2**(k-1)-b)))&1<<k-1
print(c)


### FIXED CODE ###

#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
import numpy as np
sys.setrecursionlimit(10**5)
stdin = sys.stdin
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
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

#A
def A():
    a, b, c = LI()
    if a + b >= c:
        print("Yes")
    else:
        print("No")
    return

#B
def B():
    return

#C
def C():
    n = II()
    ab = LIR(n)
    cd = LIR(n)
    ab.sort()
    cd.sort()
    check = [0 for i in range(n)]
    ans = 0
    #print(ab)
    for _, c in enumerate(cd):
        d = c[1]
        c = c[0]
        maxy = -1
        x = -1
        for k, a in enumerate(ab):
            b = a[1]
            a = a[0]
            if maxy < b and c > a and check[k] == 0 and d > b:
                maxy = b
                x = k
                #print(a,b,c,d)
        if x != -1:
            ans += 1
            check[x] += 1
    print(ans)


    return

#D
def D():
    N = II()
    a = LI()
    b = LI()
    ans = 0
    for i in range(29):
        t = 2 ** i
        a2 = [A % (2 * t) for A in a]
        b2 = [B % (2 * t) for B in b]
        a2.sort()
        b2.sort()
        ansb = 0
        for A in a2:
            ansb += np.searchsorted(b2, 2 * t - A) - np.searchsorted(b2, t - A)
            ansb += N - np.searchsorted(b2, 3* t - A)
            #print(ansb)
        #ans += (ansb % 2) << i
        ans += ((ansb %2 ) << i)
    print(ans)
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    A()
def gcd(x, y):
    while y!=0:
        x, y = y, x % y # x,yの大小が逆でも、入れ替わるので、OK
    return x

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

if n == 2:
    print(max(a))

if n>=3:
    l = [-1] * n
    r = [-1] * n
    l[0] = a[0]  #一番左を左に挿入
    r[-1] = a[-1] #一番右を右に挿入
# print(l)
# print(r)

    for i in range(1, n): #左から最大公約数をn-1回計算していく
        l[i] = gcd(l[i-1], a[i]) # l[0]とa[1]の最大公約数をl[1]に挿入⇒
        # l[1]とa[2]の最大公約数をl[2]に挿入。隣同士素があったら、それ以降右側全て1
        for i in range(n-2, -1, -1): #右から最大公約数を計算していく
        r[i] = gcd(r[i+1], a[i]) # r[n-1]とa[n-2]の最大公約数をr[n-2]に挿入

        # print("l",l) # lはn-1桁のlist
        # print("r",r)

        ans = max(r[1], l[-2]) # rの左から2番目とlの右から2番目の大きい方を、ansに挿入.
        # 右端、左端は、最大公約数ではないため。(元々の数列)

        for i in range(1, n-1): #両端を切り取った中で、lは右側に寄せて、rは左側に寄せているので、
            g = gcd(l[i-1], r[i+1]) #
            ans = max(ans, g)
            # print(i, g, ans)
    print(ans)


### FIXED CODE ###

def gcd(x, y):
    while y!=0:
        x, y = y, x % y # x,yの大小が逆でも、入れ替わるので、OK
    return x

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

if n == 2:
    print(max(a))

elif n>=3:
    l = [-1] * n
    r = [-1] * n
    l[0] = a[0]  #一番左を左に挿入
    r[-1] = a[-1] #一番右を右に挿入
# print(l)
# print(r)

    for i in range(1, n): #左から最大公約数をn-1回計算していく
        l[i] = gcd(l[i-1], a[i]) # l[0]とa[1]の最大公約数をl[1]に挿入⇒
        # l[1]とa[2]の最大公約数をl[2]に挿入。隣同士素があったら、それ以降右側全て1
    for i in range(n-2, -1, -1): #右から最大公約数を計算していく
        r[i] = gcd(r[i+1], a[i]) # r[n-1]とa[n-2]の最大公約数をr[n-2]に挿入

        # print("l",l) # lはn-1桁のlist
        # print("r",r)

    ans = max(r[1], l[-2]) # rの左から2番目とlの右から2番目の大きい方を、ansに挿入.
        # 右端、左端は、最大公約数ではないため。(元々の数列)

    for i in range(1, n-1): #両端を切り取った中で、lは右側に寄せて、rは左側に寄せているので、
        g = gcd(l[i-1], r[i+1]) #
        ans = max(ans, g)
        # print(i, g, ans)
    print(ans)
a,b,c = map(int,input(),split())

if a <= b and b <= c:
 print ("Yes")
else:
 print ("No")

### FIXED CODE ###

a,b,c = map(int,input().split())
if a <= c and c <= b:
 print ("Yes")
else:
 print ("No")
a, b = map(int, input().split())
s = list(map(int,input().split( )))
c=a-b
e = 10000000000
if a==b:
  e=s[b]-s[0]+min(abs(s[b]),abs(s[0]))
else:
  for j in range(0,c+1):
    if e>s[j+b-1]-s[j]+min(abs(s[j+b-1]),abs(s[j])):
      e=s[j+b-1]-s[j]+min(abs(s[j+b-1]),abs(s[j]))
print(e)

### FIXED CODE ###

a, b = map(int, input().split())
s = list(map(int,input().split( )))
c=a-b
e = 10000000000
if a==b:
  e=s[b-1]-s[0]+min(abs(s[b-1]),abs(s[0]))
else:
  for j in range(0,c+1):
    if e>s[j+b-1]-s[j]+min(abs(s[j+b-1]),abs(s[j])):
      e=s[j+b-1]-s[j]+min(abs(s[j+b-1]),abs(s[j]))
print(e)
a,b=map(int,input().split())
    if a<b:
        print("0")
    else:
        print(a-b)

### FIXED CODE ###

a,b=map(int,input().split())
if a<b:
    print("0")
else:
    print(a-b)
from sys import setrecursionlimit
setrecursionlimit(10 ** 6)


def popcount(n):
    return bin(n).count("1")

def g(n, m):
    if n < 60:
        return (1 << n) % m
    else:
        t = n // 2
        return g(t, m) * g(n - t, m) % m


N = int(input())
X = input()

c = X.count('1')
t1 = [0] * N
t2 = [0] * N
for i in range(N):
    n = N - 1 - i
    t1[i] = g(n, c - 1)
    t2[i] = g(n, c + 1)

x1, x2 = 0, 0
for i in range(N):
    if X[i] == '1':
        x1 += t1[i]
        x2 += t2[i]

result = []
for i in range(N):
    if X[i] == '1':
        n = x1 - t1[i]
        n %= c - 1
    elif X[i] == '0':
        n = x2 + t2[i]
        n %= c + 1
    t = 1
    while n != 0:
        n %= popcount(n)
        t += 1
    result.append(t)
print(*result, sep='\n')


### FIXED CODE ###

def popcount(n):
    return bin(n).count("1")


def f(n):
    if n == 0:
        return 0
    return 1 + f(n % popcount(n))


N = int(input())
X = input()

c = X.count('1')
t1 = [0] * N
t1[0] = 1 % (c + 1)
for i in range(1, N):
    t1[i] = (t1[i - 1] << 1) % (c + 1)
x1 = 0
for i in range(N):
    if X[i] == '0':
        continue
    x1 += t1[N - 1 - i]

if c - 1 != 0:
    t2 = [0] * N
    t2[0] = 1 % (c - 1)
    for i in range(1, N):
        t2[i] = (t2[i - 1] << 1) % (c - 1)
    x2 = 0
    for i in range(N):
        if X[i] == '0':
            continue
        x2 += t2[N - 1 - i]

result = []
for i in range(N):
    if X[i] == '0':
        n = (x1 + t1[N - 1 - i]) % (c + 1)
    elif X[i] == '1':
        if c - 1 == 0:
            result.append(0)
            continue
        n = (x2 - t2[N - 1 - i]) % (c - 1)
    result.append(1 + f(n))
print(*result, sep='\n')
#メモ化再帰
#入力
h = [0]*100010
dp = [float("inf")]*100010

def rec(i):
    #DPの値が更新されていたらそのままリターン
    if dp[i]<float("inf"):
        return dp[i]
    if i==0:
        return 0
    res = float("inf")
    res = min(res,rec(i-1)+abs(h[i]-h[i-1]))
    if i>1:
        res = min(res, rec(i - 2) + abs(h[i] - h[i - 2]))
    dp[i]=res
    return dp[i]

#入力
N=int(input())
H=list(map(int,input().split()))
for i in range(N):
    h[i] = H[i]

print(rec(N-1))

### FIXED CODE ###

N=int(input())
h=[int(i) for i in input().split()]

#DPテーブル＆最小化問題なのでINFに初期化
dp = [float("inf")]*N
#初期条件
dp[0] = 0
#ループ
for i in range(N):
    dp[i] = min(dp[i],dp[i-1]+abs(h[i]-h[i-1]))
    if i>1:
        dp[i] = min(dp[i],dp[i-2]+abs(h[i]-h[i-2]))

print(dp[-1])
a, b = map(int, raw_input().split())

if a > b:
  print 'a > b'
else if a == b:
  print 'a == b'
else:
  print 'a < b'

### FIXED CODE ###

a, b = map(int, raw_input().split())

if a > b:
  print "a > b"
elif a == b:
  print "a == b"
else:
  print "a < b"
N=int(raw_input())
A = [0 for i in range(10**9)]

for i in range(N):
    a=int(raw_input())
    A[a-1]=(A[a-1]+1)%2

print(sum(A))

### FIXED CODE ###

N=int(raw_input())
A = []
for i in range(N):
    A.append(int(raw_input()))

A.sort()
prev=A[0]
count=1
all_count=0
for i in range(1,N):
    if prev==A[i]:
        count+=1
    else:
        prev=A[i]
        all_count+=count%2
        count=1
all_count+=count%2

print all_count
import sys
x,n = map(int,input().split())
l = list(map(int,input().split()))
not_l,ans = [],[]
if not x in l:
	print(x)
	sys.exit()
l = sorted(l)
for i in range(1,101):
	if not i in l:
		not_l.append(i)
for j in range(len(not_l)):
	ans.append([not_l[j],abs(not_l[j]-x)])
ans.sort(key=lambda x:x[1])
print(ans[0][0])


### FIXED CODE ###

import sys
x,n = map(int,input().split())
l = list(map(int,input().split()))
not_l,ans = [],[]
if not x in l:
	print(x)
	sys.exit()
l = sorted(l)
for i in range(0,max(l)+3):
	if not i in l:
		not_l.append(i)
for j in range(len(not_l)):
	ans.append([not_l[j],abs(not_l[j]-x)])
ans.sort(key=lambda x:x[1])
print(ans[0][0])
import numpy as np
alp = [chr(v) for v in range(ord("a"), ord("z") + 1)]
inp = input()

if inp[::-1] == "".join(alp):
    print(-1)
    exit()

if len(inp) == len(alp):
    prev = inp[0]
    indices = [0]
    for index, char in enumerate(inp[1:]):
        if prev > char:
            indices.append(index)
        prev = char
    diff = [0] * (len(indices) - 1)
    for i, (v1, v2) in enumerate(zip(indices[1:], indices[:-1])):
        diff[i] = v1 - v2
    maxv = float("-inf")
    maxv_index = 0
    for i, d in enumerate(diff):
        if maxv <= d:
            maxv = d
            maxv_index = i

    index = indices[maxv_index + 1]
    print(inp[:index - 1] + min(inp[index:]))

else:
    print(inp + min(set(alp) - set(list(inp))))


### FIXED CODE ###

import numpy as np
alp = [chr(v) for v in range(ord("a"), ord("z") + 1)]
inp = input()

if inp[::-1] == "".join(alp):
    print(-1)
    exit()

if len(inp) == len(alp):
    prev = inp[0]
    indices = [0]
    for index, char in enumerate(inp[1:]):
        if prev < char:
            indices.append(index)
        prev = char
    # diff = [0] * (len(indices) - 1)
    # for i, (v1, v2) in enumerate(zip(indices[1:], indices[:-1])):
    #     diff[i] = v1 - v2
    # maxv = float("-inf")
    # maxv_index = 0
    # for i, d in enumerate(diff):
    #     if maxv <= d:
    #         maxv = d
    #         maxv_index = i
    #
    # index = indices[maxv_index + 1]
    index = indices[-1]
    targets = inp[index + 1:]
    for v in sorted(targets):
        if inp[index] < v:
            break
    print(inp[:index] + v)

else:
    print(inp + min(set(alp) - set(list(inp))))
n, a, b, c, d = map(int, input().split())
s = input()
if any(s[i]==s[i+1]=="#" for i in range(a-1, c-2)) or any(s[i]==s[i+1]=="#" for i in range(b-1, d-2)):
    print("No")
elif c<d:
    print("Yes")
else:
    for i in range(b-1, d-1):
        if s[i-1]==s[i]==s[i+1]==".":
            print("Yes")
            sys.exit()
    print("No")

### FIXED CODE ###

import sys
n, a, b, c, d = map(int, input().split())
s = input()
if any(s[i]==s[i+1]=="#" for i in range(a-1, c-2)) or any(s[i]==s[i+1]=="#" for i in range(b-1, d-2)):
    print("No")
elif c<d:
    print("Yes")
else:
    for i in range(b-1, d):
        if s[i-1]==s[i]==s[i+1]==".":
            print("Yes")
            sys.exit()
    print("No")
import collections as col
import math as ma

def prime(n):
    ans = []
    num = n
    for i in range(2,int(n**0.5)+1):
        if i%2==0 and i!=2: continue
        while num%i == 0: num //= i ; ans.append(i)
    if num != 1: ans.append(num)
    return ans

a,b = map(int,input().split())
gcd = ma.gcd(a,b)
primes = prime(gcd)
cnt = col.Counter(primes)
ans = len(cnt) + 1
print(ans)
        


### FIXED CODE ###

import collections as col

def prime(n):
    ans = []
    num = n
    for i in range(2,int(n**0.5)+1):
        if i%2==0 and i!=2: continue
        while num%i == 0: num //= i ; ans.append(i)
    if num != 1: ans.append(num)
    return ans

def gcd(a,b): return gcd(b,a%b) if a%b else b

a,b = map(int,input().split())
primes = prime(gcd(a,b))
cnt = col.Counter(primes)
ans = len(cnt) + 1
print(ans)