Problem:
 Score : 300 points    Problem Statement You are playing the following game with Joisino.   Initially, you have a blank sheet of paper.  Joisino announces a number. If that number is written on the sheet, erase the number from the sheet; if not, write the number on the sheet. This process is repeated N times.  Then, you are asked a question: How many numbers are written on the sheet now?   The numbers announced by Joisino are given as A_1, ... ,A_N in the order she announces them. How many numbers will be written on the sheet at the end of the game?      Constraints  1≤N≤100000  1≤A_i≤1000000000(=10^9)  All input values are integers.         Input Input is given from Standard Input in the following format:  N  A_1  :  A_N       Output Print how many numbers will be written on the sheet at the end of the game.        Sample Input 1 3
6
2
6      Sample Output 1 1  The game proceeds as follows:    6 is not written on the sheet, so write 6 .    2 is not written on the sheet, so write 2 .    6 is written on the sheet, so erase 6 .    Thus, the sheet contains only 2 in the end. The answer is 1 .       Sample Input 2 4
2
5
5
2      Sample Output 2 0  It is possible that no number is written on the sheet in the end.       Sample Input 3 6
12
22
16
22
18
12      Sample Output 3 2

Solution (Python):
n = int(input())
a_dic = {}
for i in range(n):
    a = int(input())
    if a in a_dic:
        a_dic.pop(a)
    else:
        a_dic[a] = 1
        

print(len(a_dic))

Solution (Python):
from collections import Counter as C

n = int(input())
a = C([input() for _ in range(n)])

print(sum(map(lambda v:v % 2, a.values())))

Solution (Python):
from collections import Counter as C

n = int(input())
a = C([input() for _ in range(n)])

print(sum([v % 2 for v in a.values()]))

Solution (Python):
from collections import Counter as C

n = int(input())
a = C([input() for _ in range(n)])

print(sum([1 for v in a.values() if v % 2]))

Solution (Python):
import collections

n = int(input())
a = []
for i in range(n):
    a.append(int(input()))
c = collections.Counter(a)
ans = 0
for k,v in c.items():
    if v % 2 == 0:
        continue
    else:
        ans +=1
print(ans)

Solution (Python):
N = int(input())
S = set()
for _ in range(N):
  t = input()
  if t in S:
    S.discard(t)
  else:
    S.add(t)
print(len(S))

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

D={}
for _ in range(N):
    a=int(input())
    try:
        D[a]+=1
    except KeyError:
        D[a]=1

S=0
for b in D:
    S+=D[b]%2
print(S)

Solution (Python):
import sys
import collections

read=sys.stdin.buffer.read
readline=sys.stdin.buffer.readline
readlines=sys.stdin.buffer.readlines

N=int(readline())
A=collections.Counter(read().splitlines())

print(len([v for k,v in A.items() if v%2==1]))

Solution (Python):
N = int(input())
A = [int(input()) for _ in range(N)]
dic = {}
for i in range(N):
    data = A[i]
    if data in dic:  dic[data] += 1
    else:  dic[data] = 1
ans = 0
for i in dic:
    if dic[i] % 2:  ans += 1
print(ans)

Solution (Python):
from collections import Counter
N = int(input())
C = Counter([int(input()) for _ in range(N)])
print(len(list(filter(lambda x: x % 2 == 1, list(C.values())))))

Solution (Python):
n = int(input())
d = {}
for i in range(n):
  a = int(input())
  d[a] = d.get(a, 0) + 1

c = 0
for e in d.values():
  if e % 2 == 1:
    c += 1
print(c)

Solution (Python):
N = int(input())
lis = list()
for i in range(N):
    lis.append(int(input()))

import collections

c = collections.Counter(lis)

ans = 0
for i in c.most_common():
    if i[1] % 2 != 0:
        ans += 1

print(ans)

Solution (Python):
from collections import Counter
n = int(input())
a = Counter([int(input()) for i in range(n)])
ans = 0
for num, c in a.items():
    if c%2==1:
        ans+=1
print(ans)

Solution (Python):
from collections import Counter

def main():
    a = Counter(int(input()) for _ in range(int(input())))
    ans=0
    for i,v in a.items():
        if v % 2 != 0:
            ans+=1
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):
from collections import deque
n = int(input())
a = [int(input()) for _ in range(n)]
da = deque(sorted(a))
dans = deque()
dans.append(da.popleft())
for _ in range(1,n):
  if len(dans) == 0:
    dans.append(da.popleft())
  else:
    dlast = dans.pop()
    daleft = da.popleft()
    if dlast != daleft:
      dans.append(dlast)
      dans.append(daleft)
print(len(dans))

Solution (Python):
from collections import Counter 
n=int(input())
a=Counter([int(input()) for _ in range(n)])
ans=0
for i in a.values():
  ans+=i%2
print(ans)

Solution (Python):

import sys
from collections import deque, defaultdict
from math import sqrt, factorial





def solve():
    n = int(input())
    s = set()
    for _ in range(n):
        a = int(input())
        if a not in s:
            s.add(a)
        else:
            s.remove(a)
    print(len(s))

    

t = 1

for case in range(1,t+1):
    ans = solve()


"""

1 + k



"""

Solution (Python):
s = set()
for _ in range(int(input())):
    i = (int(input()))
    if i not in s:
        s.add(i)
    else:
        s.remove(i)
print(len(s))

Solution (Python):
n = int(input())
A = []

for i in range(n):
    a = int(input())
    A.append(a)
A.sort()
i = 0
ans = 0
while True:
    cnt = 0
    while A[i + cnt] == A[i]:
        cnt += 1
        if i + cnt == n:
            break
    if cnt%2 == 1:
        ans += 1
    i += cnt
    if i == n:
        break
print(ans)

Solution (Python):
n = int(input())
A = []

for i in range(n):
    a = int(input())
    A.append(a)
A.sort()
i = 0
ans = 0
while True:
    cnt = 0
    while A[i + cnt] == A[i]:
        cnt += 1
        if i + cnt == n:
            break
    if cnt%2 == 1:
        ans += 1
    i += cnt
    if i == n:
        break
print(ans)

Solution (Python):
N =int(input())
set_ = set()
for _ in range(N):
    val = input()
    if val in set_:
        set_.remove(val)
    else:
        set_.add(val)
print(len(set_))

Solution (Python):
from collections import defaultdict
N = int(input())
c = defaultdict(int)
for i in range(N):
    a = int(input())
    c[a] ^= 1
print(list(c.values()).count(1))

Solution (Python):
N=int(input())
s=set()
for i in range(N):s^={input()}
print(len(s))

Solution (Python):

n = int(input())
a = [int(input()) for i in range(n)]
d = {}

for i in a:
    if i in d:
        del d[i]
    else:
        d[i] = i

print(len(d))

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

d = dict()
for _ in range(n):
    a = int(input())
    if a not in d:
        d[a] = 1
    else:
        d[a] += 1

res = 0
for v in d.values():
    if v % 2 == 1:
        res += 1

print(res)

Solution (Python):
from collections import Counter


def main():
    n = int(input())
    As = list(int(input()) for _ in range(n))
    As_count = Counter(As)
    ans = 0
    for _, count in As_count.items():
        if (count % 2) == 0:
            continue
        ans += 1
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
from collections import Counter
N = int(input())
A = []
for i in range(N):
  A.append(int(input()))
  
c = Counter(A)
ans = 0
for i in c.items():
  if i[1] % 2 == 1:
    ans += 1
print(ans)

Solution (Python):
from collections import Counter
N = int(input())
A = [int(input()) for _ in range(N)]
C = Counter(A)
c = 0
for k, v in C.items():
    if v % 2 == 1:
        c += 1
print(c)

Solution (Python):
n = int(input())
C = {}
for _ in range(n):
    a = input()
    if a not in C:
        C[a] = 0
    C[a] += 1
for i in C.keys():
    C[i] %= 2
print(sum(C.values()))

Solution (Python):
from collections import defaultdict
n = int(input())
d = defaultdict(int)
for _ in range(n):
    a = input()
    d[a] += 1
ans = sum([v % 2 for v in d.values()])
print(ans)

Solution (Python):
n = int(input())
d = {}
for _ in range(n):
  a = int(input())
  if a in d: d[a] += 1
  else: d[a] = 1

ans = 0
for i in d.values():
  if i%2 != 0: ans += 1
print(ans)

Solution (Python):
import collections
N = int(input())
ans = [0] * N

for i in range(N):
  ans[i] = int(input())
  
C = collections.Counter(ans)
count = 0
for i in C.values():
  if i % 2 == 1:
    count += 1
  
print(count)

Solution (Python):
import collections

n = int(input())
lis = []
for _ in range(n):
    lis.append(int(input()))
    
a = collections.Counter(lis)

ans = 0
for i, j in a.items():
    if j % 2 == 0:
        continue
    else:
        ans += 1
print(ans)

Solution (Python):
from collections import defaultdict
N = int(input())

c = defaultdict(int)

for _ in range(N):
    c[int(input())] ^= 1

res = 0
for v in c.values():
    if v:
        res += 1

print(res)

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

s = set()
for _ in range(N):
    A = int(input())
    if A in s:
        s.remove(A)
    else:
        s.add(A)

print(len(s))

Solution (Python):
N = int(input())
a = [input() for _ in range(N)]
a = sorted(a)

c = 0
ans = 0
for i in range(N):
    c += 1
    if i == N-1:
        if c % 2 == 1:
            ans += 1
    elif a[i] != a[i+1]:
        
        if c % 2 == 1:
            ans += 1
        c = 0

print(ans)

Solution (Python):
import math
import collections
import fractions
import itertools
import functools
import  operator

def solve():
    n = int(input())
    a = [int(input()) for _ in range(n)]
    c = collections.Counter(a)
    cnt = 0
    for i in c:
        if c[i] % 2 == 1:
            cnt += 1
    print(cnt)
    return 0

if __name__ == "__main__":
    solve()

Solution (Python):
import collections

n = int(input())
an = []
for i in range(n):
    a = input()
    an.append(a)

c = list(collections.Counter(an).values())
Ans = 0
for i in range(len(c)):
    if int(c[i]) % 2 == 1:
        Ans = Ans + 1

print(Ans)

Solution (Python):
n = int(input())
d = set([])
for i in range(n):
    a = int(input())
    if a in d:
        d.remove(a)
    else:
        d.add(a)
print(len(d))

Solution (Python):
n = int(input())
a = [int(input()) for _ in range(n)]

a_set = set()
for a_i in a:
    a_set ^= {a_i}

print(len(a_set))

Solution (Python):




n = int(input())


a = []
for i in range(n):
    a.append(int(input()))

l = {}
for _a in a:
    if _a in l:
        l.pop(_a)
    else:
        l.update(
            {_a: True}
        )

print(len(l))

Solution (Python):
n=int(input())
lst=[int(input()) for i in range(n)]

from collections import Counter
c=Counter(lst)
c=c.most_common()
ans=0
for i in c:
    if i[-1]%2==1:
        ans+=1
print(ans)

Solution (Python):
from collections import Counter

n=int(input())
a = [input() for _ in range(n)]
c = Counter(a)
count = 0
for i in c.keys():
  count += c[i]%2
print(count)

Solution (Python):
n=int(input())
a = [input() for _ in range(n)]
a.sort()
dict = {}
count = 0
for i in range(n):
  k = a[i]
  if (k in dict):
    count-=dict[k]
    dict[k]=1-dict[k]
    count+=dict[k]
  else:
    dict[k]=1
    count+=1
print(count)

Solution (Python):
from collections import Counter
N = int(input())
A = [int(input()) for _ in range(N)]
C = Counter(A)
ans = sum(C[key] % 2 for key in C)
print(ans)

Solution (Python):
from collections import Counter
n = int(input())
l = []
for i in range(n):
    l.append(int(input()))

c = Counter(l)
cnt = len(c)
l = list(c.most_common(len(c)))
for t in l:
    i = t[1]
    if i % 2 == 0:
        cnt -= 1
print(cnt)

Solution (Python):
n = int(input())
a = [int(input()) for _ in range(n)]

a = sorted(a)
tmp = 0
ans = 0
for i in a:
    if i == tmp:
        ans -= 1
        tmp = 0
    else:
        ans += 1
        tmp = i

print(ans)

Solution (Python):
import sys
sys.setrecursionlimit(500000)

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

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]


def main():
    N = ii()
    A = [ii() for _ in range(N)]
    dic = {}
    for a in A:
        if (not a in dic) or (dic[a] == 0):
            dic[a] = 1
        else:
            dic[a] = 0
    print(sum(dic.values()))


if __name__ == '__main__':
    main()

Solution (Python):
import sys
import math
import itertools
import bisect
from copy import copy,deepcopy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(map(int,input().split()))
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

N = i()
A = [i() for _ in range(N)]
C = Counter(A)
ans = 0
for c in C.values():
    if c%2 == 1:
        ans += 1
print(ans)

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

d={}

for _ in range(n):
    a=int(input())
    if a not in d:
        d[a]=1
    else:
        if d[a]==1:
            d[a]=0
        else:
            d[a]=1

ans=0
for _,v in d.items():
    if v==1:
        ans+=1

print(ans)

Solution (Python):
n=int(input())
num=[]
def ap(num1):
    num.append(num1)
for i in range(n):
    a=int(input())
    ap(a)
num.sort()
num1=num[0]
num2=1
ans=0
for i in range(n-1):
    if num[i+1]==num1:
        num2+=1
    else:
        num1=num[i+1]
        if num2%2==1:
            ans+=1
        num2=1
if num2%2==1:
    ans+=1
print(ans)

Solution (Python):
import sys
from collections import Counter
input = sys.stdin.readline
N = int(input())
A = [int(input()) for _ in range(N)]
c = Counter(A)
print(sum(map(lambda x: x % 2, c.values())))

Solution (Python):
from collections import Counter
N = int(input())
A = [int(input()) for _ in range(N)]
c = Counter(A)
print(sum(tuple(map(lambda x: x % 2, c.values()))))

Solution (Python):
n = int(input())
st = set()
for i in range(n):
  a = input()
  if a in st:
    st.discard(a)
  else:
    st.add(a)
print(len(st))

Solution (Python):
n = int(input())
d = {}
for _ in range(n):
  a = int(input())
  if a not in d: d[a] = 1
  else: d[a] += 1

ans = 0
for i in d.values():
  if i%2 != 0: ans += 1
print(ans)

Solution (Python):
from collections import defaultdict
N = int(input())
d = defaultdict(int)
for _ in range(N):
    a = int(input())
    d[a] = (d[a]+1)%2
print(sum(d.values()))

Solution (Python):
from collections import Counter
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


n = I()
a = IR(n)
counter = Counter(a)
ans = 0
for _, cnt in counter.items():
    if cnt % 2 != 0:
        ans += 1
print(ans)

Solution (Python):
N=int(input())
S=set()
for i in range(N):
    S^={input()}
print(len(S))

Solution (Python):
from collections import defaultdict
n = int(input())
dd = defaultdict(int)

for i in range(n):
    dd[int(input())] += 1

ans = 0
for k, v in dd.items():
    if v % 2 == 1:
        ans += 1

print(ans)

Solution (Python):
n = int(input())
A = [input() for _ in range(n)]
AS = set()
for i in A:
    if i not in AS:
        AS.add(i)
    else:
        AS.remove(i)
print(len(AS))

Solution (Python):
import bisect
n=int(input())
a=[]
lis=[]
for i in range(n):
  inp=int(input())
  a.insert(bisect.bisect_left(a,inp),inp)
ans=0
bef=a[0]
co=0
for i in a[1:]:
  if i!=bef:
    ans+=(co+1)%2
    co=0
    bef=i
  else:
    co+=1
ans+=(co+1)%2
print(ans)

Solution (Python):
from collections import defaultdict
n=int(input())
d=defaultdict(int)
for i in range(n):
    a=int(input())
    d[a]+=1

sm=0
for i,j in d.items():
    sm+=j%2

print(sm)

Solution (Python):
n = int(input())
a_list = [int(input()) for _ in range(n)]

my_set = set()
for i in a_list:
  if i in my_set:
    my_set.remove(i)
  else:
    my_set.add(i)
print(len(my_set))

Solution (Python):
import collections
N= int(input())
A = sorted(list(int(input()) for i in range(N)))
c = collections.Counter(A)
count = 0

for v in c.values():
    if v%2 !=0:
        count +=1 

print(count)

Solution (Python):


import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate


def exit(*argv, **kwarg):
    print(*argv, **kwarg)
    sys.exit()


def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))



def a_int(): return int(read())


def read_col(H):
    '''H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) 
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, zip(*ret)))


from collections import Counter
N = a_int()
A, = read_col(N)
ans = 0
for v in Counter(A).values():
    ans += v & 1
print(ans)

Solution (Python):
from collections import defaultdict
N=int(input())
D=defaultdict(int)
for i in range(N):
    a=int(input())
    D[a]+=1

ans=0
for v in D.values():
    if v%2==1:
        ans+=1

print(ans)

Solution (Python):
N=int(input())
A=[int(input()) for _ in range(N)]
A.sort()
A.append(0)
ans=0
i=0
j=0
while i<N:
  b=A[i]
  c=0
  while b==A[i] and i<N:
    c+=1
    i+=1
  ans+=(c%2)
print(ans)

Solution (Python):
n = int(input())
a = [int(input()) for _ in range(n)]

my_set = set()

for item in a:
    if item in my_set:
        my_set.remove(item)
    else:
        my_set.add(item)

print(len(my_set))

Solution (Python):
from collections import Counter
n = int(input())
a = [int(input()) for _ in range(n)]
a_count = Counter(a)
cnt = 0
for key,value in a_count.items():
    if value % 2 == 1:
        cnt += 1
    else:
        pass
print(cnt)

Solution (Python):
N = int(input())
dic_a = {}
for i in range(N):
    a= int(input())
    if a in dic_a:
        dic_a[a] +=1
        dic_a[a] = dic_a[a]%2
    else:
        dic_a[a] = 1
print(sum(list(dic_a.values())))

Solution (Python):
N = int(input())
ans = set()

for _ in range(N):
    a = int(input())
    if not a in ans:
        ans.add(a)
    else:
        ans.remove(a)
print(len(ans))

Solution (Python):




import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter
import itertools











N = int(input())
A = [int(input()) for _ in range(N)]
C = collections.Counter(A)
data = list(C.values())

ans = 0

for i in range(len(data)):
    if data[i] % 2 == 1:
        ans+=1

print(ans)

Solution (Python):
n=int(input())
arr=[0]*n
for i in range(n):
    arr[i]=int(input())

arr=sorted(arr)
num=arr[0]
tmp=1
ans=0
for i in range(1,n):
    if arr[i]==num:
        tmp+=1
    else:
        if tmp%2==1:
            ans+=1
        num=arr[i]
        tmp=1
if tmp%2==1:
    ans+=1    
print(ans)

Solution (Python):
from collections import Counter
n=int(input())
c=Counter([int(input())for i in range(n)])
a=0
for i in c.values():a+=1if i%2else 0
print(a)

Solution (Python):
from collections import Counter
n = int(input())
a = [int(input()) for i in range(n)]
p = Counter(a)
ans = 0
for i in p:
    if p[i] % 2 == 1:
        ans += 1
print(ans)

Solution (Python):
n = int(input())
d = dict()
for _ in range(n):
    a = int(input())
    d.setdefault(a, -1)
    d[a] *= -1

ans = 0    
for k, v in d.items():
    if v == 1:
        ans += 1
print(ans)

Solution (Python):
from collections import defaultdict
N,*A = map(int,open(0).read().split())
d = defaultdict(int) 
for a in A:
    d[a] ^= 1 
print(sum(d.values()))

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

a = [int(input()) for _ in range(N)]

st = 0
ans = 0
a.sort()
for i in range(N):
    if a[i] == st:
        ans -= 1
        st = 0
    else:
        ans += 1
        st = a[i]
print(ans)

Solution (Python):
from collections import Counter
n=int(input())
a=[int(input()) for _ in range(n)]
c=Counter(a)
ret=0
for list in c.items():
    if list[1]%2==1:
        ret+=1
print(ret)

Solution (Python):
n = int(input())
d = {}
for i in range(n):
    a = int(input())
    if a in d:
        d[a] += 1
    else:
        d[a] = 1
c = 0
for i in d:
    if d[i] % 2 == 1:
        c += 1
print(c)

Solution (Python):
import collections as cl
N = int(input())
x = []
count = 0

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

d = cl.Counter(x)

for i in d.values():
    if i % 2 == 1:
        count += 1
print(count)

Solution (Python):
import collections
n = int(input())
l = []
for i in range(n):
  l.append(int(input()))
d = collections.Counter(l)
ans = 0
for v in d.values():
  if v % 2 == 1:
    ans += 1
print(ans)

Solution (Python):
from collections import defaultdict
N,*A = map(int,open(0).read().split())
d = defaultdict(int) 
for a in A:
    d[a] ^= 1 
print(sum(d.values()))

Solution (Python):
from collections import Counter
N,*A = map(int,open(0).read().split())
ca = Counter(A)
copy_ca = ca.copy()
for i in ca.items():
    if i[1] % 2 == 0:
        del copy_ca[i[0]]
print(len(copy_ca))

Solution (Python):
n = int(input())
d = dict()
for _ in range(n):
    a = int(input())
    d.setdefault(a, -1)
    d[a] *= -1

ans = 0    
for k, v in d.items():
    if v == 1:
        ans += 1
print(ans)

Solution (Python):
n=int(input())
d=dict()
for i in range(n):
    a=input()
    if a in d:
        d[a]=(d[a]+1)%2
    else:
        d[a]=1
print(len([i for i,j in d.items() if j==1]))

Solution (Python):
from collections import Counter
n = int(input())
a = [int(input()) for i in range(n)]
p = Counter(a)
ans = 0
for i in p:
    if p[i] % 2 == 1:
        ans += 1
print(ans)

Solution (Python):
_, *a = map(int, open(0))
from collections import*
print(sum(map(lambda k:k%2, Counter(a).values())))

Solution (Python):
from collections import defaultdict
p = defaultdict(int)
for q in range(int(input())):
    a = int(input())
    p[a] += 1
ans = 0
for q in p.values():
    ans += 1 if q % 2 else 0
print(ans)

Solution (Python):
n=int(input())
from collections import Counter
c=Counter()
for i in range(n):
  aa=int(input())
  if c[aa]>0:
    c[aa]-=1
    continue
  else:
    c[aa]+=1
ans=0
for k,v in c.items():
  if v>0:ans+=1
print(ans)

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N = int(input())
As = [int(input()) for _ in range(N)]
from collections import Counter

c = Counter(As)
ans = 0
for i, cnt in c.most_common():
    if cnt%2==0:
        continue
    else:
        ans += 1

print(ans)

Solution (Python):
n = int(input())
A = [int(input()) for _ in range(n)]

p = {}
for a in A:
    if a in p:
        if p[a] == 1:
            p[a] = 0
            continue
    p[a] = 1
ans = 0
for i in p.values():ans += i
print(ans)

Solution (Python):



from fractions import gcd
from itertools import combinations,permutations,accumulate 

from collections import deque,defaultdict,Counter











import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
n = I()
A = [I() for _ in range(n)]
dic = Counter(A)
cnt = 0
for k,v in dic.items():
    if v%2:
        cnt += 1
print(cnt)

Solution (Python):
n = int(input())
s = set()
for _ in range(n):
	a = int(input())
	if a in s:
		s.discard(a)
	else:
		s.add(a)
print(len(s))

Solution (Python):


from collections import Counter

def main():
    n = int(input())
    numbers=[]
    answers=[]
    number=0
    numbers=[int(input()) for _ in range(n)]
    Numbers_col = Counter(numbers)

    for number in Numbers_col.values():
        if number%2!=0:
            answers.append(number)
    print(len(answers))

if __name__=="__main__":
    main()

Solution (Python):
import collections

N=int(input())
check1=list()
for i in range(N):
  check1.append(int(input()))
c=collections.Counter(check1)
check2=set(check1)
ans=0
for i in check2:
  if c[i]%2!=0:
    ans+=1
print(ans)

Solution (Python):
import collections
n = int(input())
a = [int(input()) for _ in range(n)]
result = 0
cnt = collections.Counter(a)
for i in cnt.values():
    if i % 2 == 1:
        result += 1

print(result)

Solution (Python):
N = int(input())
A = [int(input()) for i in range(N)]
import collections
c = collections.Counter(A)

ans = 0
for i in c:
  if c[i] % 2 != 0:
    ans += 1
print(ans)

Solution (Python):
N,*A = open(0)
S = set()

for a in A:
  S^={int(a)}

print(len(S))

Solution (Python):
from collections import *
N = int(input())
C = Counter([int(input()) for n in range(N)]) 
A = [1 for v in C.values() if v%2==1]
print(sum(A))

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

a = [int(input()) for i in range(n)]

import collections
c = collections.Counter(a)

res = 0
for i in c:
  if c[i] % 2 != 0:
    res += 1
print(res)

Solution (Python):
import collections


n = int(input())
keep = []
ans = 0
for i in range(n):
    j = int(input())
    keep.append(j)

c = collections.Counter(keep)
print(len([i[0] for i in c.items() if i[1] % 2 != 0]))

Solution (Python):
import collections


n = int(input())
keep = []
ans = 0
for i in range(n):
    j = int(input())
    keep.append(j)

c = collections.Counter(keep)
print(len([i[0] for i in c.items() if i[1] % 2 != 0]))

Solution (Python):
from collections import defaultdict
n = int(input())
A = defaultdict(int)
for i in range(n):
    a = int(input())
    if A[a] == 1:
        A[a] = 0
    else:
        A[a] = 1
print(sum(A.values()))

Solution (Python):
n = int(input())
l = [int(input()) for _ in range(n)]
l.sort()
c = 1
ans = 0
for i in range(1, n):
  if l[i-1] == l[i]:
    c += 1
  else:
    ans += c%2
    c = 1
if c != 1:
  ans += c%2
else:
  ans += 1
print(ans)

Solution (Python):
import sys
N = int(input())
A = set()
for i in sys.stdin:
    A ^= {i}
print(len(A))

Solution (Python):
N = int(input())
A = set()
for i in range(N):
    A ^= {input()}
print(len(A))

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



def main():
    N = int(input().strip())
    ans = set()
    for _ in range(N):
        A = int(input().strip())
        if A in ans:
            ans.remove(A)
        else:
            ans.add(A)

    return len(ans)


if __name__ == "__main__":
    print(main())

Solution (Python):
from collections import Counter
n = int(input())
A = Counter(list(int(input()) for _ in range(n)))
ans = 0
for a in A.values():
  if a%2 == 1:
    ans += 1
print(ans)

Solution (Python):
from collections import Counter
n = int(input())
A = Counter([int(input()) for _ in range(n)])
cnt = 0
for k in A.values():
    if k%2 != 0:
        cnt +=1
print(cnt)

Solution (Python):
from collections import Counter

n = int(input())
a = [int(input()) for _ in range(n)]
cnt = Counter(a)
ans=0
for val in set(a):
    if cnt[val]%2!=0:
        ans+=1
print(ans)

Solution (Python):
n = int(input())
apple = []
for _ in range(n):
    apple.append(int(input()))
apple = sorted(apple)
apple.append(0)
count = 0
ans = 1
for i in range(n):
    if apple[i] == apple[i + 1]:
        ans += 1
    else:
        if ans%2 == 0:
            ans = 1
        else:
            count += 1
print(count)

Solution (Python):
n = int(input())
a = [int(input()) for _ in range(n)]

from collections import Counter

c = Counter(a)
print(sum([1 for num,cnt in c.items() if cnt%2==1]))

Solution (Python):
n = int(input())
d = {}

for i in range(n):
    a = int(input())
    if a in d:
        del d[a]
    else:
        d[a] = 1

print(len(d))

Solution (Python):
def resolve():
    from collections import defaultdict
    N = int(input())
    A = [int(input()) for _ in range(N)]
    c = defaultdict(int)
    for a in A:
        c[a] += 1
    ans = 0
    for v in c.values():
        if v % 2 == 1:
            ans += 1
    print(ans)


resolve()

Solution (Python):
n = int(input())
a = [int(input()) for _ in range(n)]

ans = set()
for each in a:
  if each in ans:
    ans.remove(each)
  else:
    ans.add(each)
    
print(len(ans))

Solution (Python):
n = int(input())
dic = {}
ans = 0
for i in range(n):
  temp = input()
  if not temp in dic:
    dic[temp]=1
    ans += 1
  elif dic[temp]==0:
    dic[temp]=1
    ans+=1
  elif dic[temp]==1:
    dic[temp]=0
    ans-=1
print(ans)

Solution (Python):
import re

n = int(input())
s = {}

for i in range(n):
    a = input()
    if a in s:
        s[a] = not s[a]
    else:
        s[a] = True

print(list(s.values()).count(True))

Solution (Python):
from collections import Counter
N=int(input())
A=Counter([int(input()) for i in range(N)])
print(sum(1 if count%2 else 0 for count in A.values()))

Solution (Python):
import collections;print(len([1 for i in collections.Counter([int(input()) for i in range(int(input()))]).values() if i%2!=0]))

Solution (Python):
from collections import Counter
print(len([1 for i in Counter([int(input()) for i in range(int(input()))]).values() if i%2!=0]))

Solution (Python):
from collections import Counter
N=int(input())
print(len([1 for i in Counter([int(input()) for i in range(N)]).values() if i%2!=0]))

Solution (Python):
N=int(input())
A=[int(input()) for i in range(N)]
dict = {}
for i in A:
  if i not in dict:
    dict[i] = 1
  else:
    dict[i] += 1
print(len([1 for i in dict.values() if i%2!=0]))

Solution (Python):
from collections import Counter
N = int(input())
A = []
for i in range(N): A.append(int(input()))
count = Counter(A).values()
ans = 0
for i in count :ans += i % 2
print(ans)

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

rlt = 0
dic = {}

for _ in range(N):
  a = input()
  if a not in dic:
    dic[a] = 1
  else:
    dic[a] += 1
    
for k in dic:
  if dic[k] % 2 == 1:
    rlt += 1
    
print(rlt)

Solution (Python):
n = int(input())
l = []
 
for _ in range(n):
    a = int(input())
    l.append(a)

l.sort()

ans = 0
cnt = 1
tmp = l[0]
for i in range(1,len(l)):
    if tmp == l[i]:
        cnt += 1
        tmp = l[i]
    else:
        if cnt%2 != 0:
            ans += 1
            cnt = 1
            tmp = l[i]
        else:
            cnt = 1
            tmp = l[i]
if cnt%2 != 0:
    ans += 1

print(ans)

Solution (Python):
n = int(input())
l = []
cnt = 0
for i in range(n):
    x = int(input())
    l.append(x)


x = sorted(l)
i=1
same=1
while i<n:
    if x[i]==x[i-1]:
        same += 1
    else:
        if same%2 == 1:
            cnt += 1
        same = 1
    i += 1

cnt += same%2
print(cnt)

Solution (Python):
from collections import Counter
N = int(input())
A = [int(input()) for _ in range(N)]
c = Counter(A)
ans = 0
for value in c.values():
    if value % 2 == 1:
        ans += 1
print(ans)

Solution (Python):
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

N = int(input())

s = set()
for i in range(N):
    A = int(input())
    if A in s:
        s.remove(A)
    else:
        s.add(A)

print(len(s))

Solution (Python):
n = int(input())
a=[]
for x in range(n):
    a.append(int(input()))
numlist = sorted(a)
t = a[0]
m = [0]
p = 0
for x in numlist:
    if t == x:
        m[-1] += 1
    else:
        m.append(1)
        t=x
for x in m:
    if x % 2 == 1:
        p += 1
print(p)

Solution (Python):


N = int(input())
d = {}
for i in range(N):
    a = int(input())
    if a in d and d[a]:
        d[a] = 0
    else:
        d[a] = 1
cnt = 0
for a in d:
    if d[a]:
        cnt += 1
print(cnt)

Solution (Python):
n = int(input())
a = [int(input()) for i in range(n)]
count = [0]*n
ans = set([])
for i in range(n):
    if a[i] in ans:
        ans.remove(a[i])
    else:
        ans.add(a[i])
print(len(ans))

Solution (Python):
n=int(input())
a=[int(input()) for _ in range(n)]
from collections import defaultdict
ans=0
d=defaultdict(int)
for ai in a:
  d[ai]+=1
  ans+=1 if d[ai]%2==1 else -1
print(ans)