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 = {}
for i in range(n):
    a = int(input())
    if a not in A: A[a] = 1
    else: A[a] += 1
c = 0
for i in A:
    if A[i] % 2 == 1:
        c += 1
print(c)

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

Solution (Python):
from collections import Counter

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

a = list(Counter(A).values())
ans = 0
for i in a:
    if i % 2 == 1:
        ans += 1

print(ans)

Solution (Python):
N = int(input())
A = [int(input()) for i in range(N)]
l = {}

for a in A:
    if a not in l:
        l[a] = 0
    if l[a] != 0:
        l[a] = 0
    else:
        l[a] = 1

ans = 0
for d in l.values():
    ans += d

print(ans)

Solution (Python):
from collections import Counter
N=int(input())
A=[int(input()) for _ in range(N)]
l=[]
c=Counter(A)
values=list(c.values())
key=list(c.keys())
cnt=0
for i in range(len(key)):
    l.append([key[i],values[i]])

for i in range(len(key)):
    if l[i][1]%2==1:
        cnt=cnt+1
print(cnt)

Solution (Python):

n=int(input())
a=dict()
for i in range(n):
    x=int(input())
    if x not in a:
        a[x]=1
    else:
        a[x]+=1
ans=0
for i in a.values():
    if i%2==1:
        ans+=1
print(ans)

Solution (Python):
n=int(input())
L=[0 for _ in range(n+1)]
for i in range(n):
    L[i]=int(input())
list.sort(L, reverse=True)
ans=0
cnt=1
for i in range(n):
    if L[i]==L[i+1]:
        cnt+=1
    else:
        if cnt%2!=0:
            ans+=1
        cnt=1
print(ans)

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

L = set([])

for i in range(n):
    tmp = int(input())
    if tmp in L:
        L.remove(tmp)
    else:
        L.add(tmp)

print(len(L))

Solution (Python):
N = int(input())
l = [int(input()) for i in range(N)]

import collections

c = collections.Counter(l)
ans = 0
for i in c.values():
    if i % 2 != 0:
        ans += 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 i,m in d.items():
    if m%2!=0:
        ans+=1
print(ans)

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

Solution (Python):
n = int(input())
l = [int(input()) for _ in range(n)]
d = {}
for i in l:
    d[i] = d.get(i, 0) + 1
ans = 0
for v in d.values():
    if v % 2 == 1:
        ans += 1
print(ans)

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

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

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

Solution (Python):

n=int(input())
s=set()
for _ in range(n):
    s^={input()}
print(len(s))

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

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

Solution (Python):
N = int(input())
A = [int(input()) for i in range(N)]

from collections import Counter
c = Counter(A)
keys, values = zip(*c.most_common())

n = len(values)
ans = 0

for i in range(n):
    if values[i]%2 == 1:
        ans += 1
        
print(ans)

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

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

from collections import defaultdict
d = defaultdict(int)
for _ in range(n):
    d[int(input())] += 1


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

Solution (Python):

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    from collections import defaultdict
    dd = defaultdict(int)
    
    N=I()
    for i in range(N):
        A=I()
        dd[A]+=1
    ans=0
    for k,v in dd.items():
        if v%2==1:
            ans+=1
    print(ans)

main()

Solution (Python):
N = int(input())
A = []
for _ in range(N):
    A.append(int(input()))
A = sorted(A)
cnt = 1
ans = 0

for i in range(N-1):
    if(A[i] == A[i+1]):
        cnt += 1
        continue
    ans += cnt % 2
    cnt = 1

if(cnt % 2 == 1):
    ans += 1

print(ans)

Solution (Python):
N = int(input())
A = []
for i in range(N):
    a = int(input())
    A.append(a)
A.sort()
ans = 0
cnt = 1
for i in range(N-1):
    if A[i] == A[i + 1]:
        cnt += 1
        continue
    ans += cnt % 2
    cnt = 1
if cnt % 2 == 1:
    ans += 1
print(ans)

Solution (Python):
n = int(input())
a = {}
cnt = 0
for i in range(n):
    tmp = int(input())
    if tmp not in a:
        a[tmp] = 1
    else:
        a[tmp] += 1

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

print(cnt)

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

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

    
d = {}
for a in al:
    d.setdefault(a, 0)
    d[a] = (d[a] + 1) % 2

print(sum(d.values()))

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

A = []

for i in range(n):
    A.append(int(input()))

A = sorted(A)



s = A

A = []
t = 1
for i in range(1, len(s)):
    if s[i - 1] != s[i]:
        A.append(s[i-1])
        A.append(str(t))
        t = 1
    else:
        t += 1
    if i == len(s) - 1:
        if s[i-1] == s[i]:
            A.append(s[i-1])
            A.append(str(t))
        else:
            A.append(s[i])
            A.append("1")

t = 0
for i in range(len(A)):
    if i % 2 == 1:
        if int(A[i]) % 2 == 1:
            t += 1
print(t)

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

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

print(len(ans))

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

ptr=0
res=0
while ptr<n:
    cc=a[ptr]
    f=0
    while ptr<n and a[ptr]==cc: 
        f+=1
        ptr+=1
    res+=f%2 
print(res)

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

c=Counter(a)
cnt=0
for v in c.values():
    if v%2==1:
        cnt+=1
print(cnt)

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

ans = 0
L = []
ans_L = {}

for i in range(N):
    L.append(int(input()))

for j in L:
    if not j in ans_L.keys():
        ans_L[j] = 0
    
    if ans_L[j]==0:
        ans_L[j] += 1
    elif ans_L[j]== 1:
        ans_L[j] -= 1

print(sum(ans_L.values()))

Solution (Python):
import sys
input = sys.stdin.readline
N=int(input())
ans=dict()
cnt=0

for _ in range(N):
    A=int(input())
    if((A in ans)==False):
        ans[A]=1
    else:
        ans[A]+=1

for value in ans.values():
    if(value%2==1):
        cnt+=1

print(cnt)

Solution (Python):
N=int(input())
ans=set()
for i in range(N):
  tmp=int(input())
  if tmp in ans:
    ans.remove(tmp)
  else:
    ans.add(tmp)
    
print(len(ans))

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

def main():
    N = int(input())
    a_list = list([int(input()) for _ in range(N)])
    a_freq = collections.Counter(a_list)
    print(len([freq for freq in a_freq.values() if freq % 2 == 1]))

if __name__ == '__main__':
    main()

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):
N = int(input())
list_A = [int(input()) for i in range(N)]

from collections import Counter
list_X = Counter(list_A).values()

ans = 0
for X in list_X :
    if X%2 == 1 :
        ans += 1

print(ans)

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())
p=[]
count=0
for i in range (N):
  a=int(input())
  p.append(a)
list.sort(p)
flag=1
for j in range (N-1):
  if p[j]==p[j+1]:
    flag*=-1
  else:
    if flag>0:
      count+=1
    flag=1
if flag>0:
  count+=1
print(count)

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

now=a[0]
odd=False
ans=0
for i in range(n):
	
	if a[i]==now:
		odd=not odd
	
	else:
		
		ans+=odd
		
		now=a[i]
		odd=True

print(ans+odd)

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

now=a[0]
odd=False
ans=0
for i in range(n):
	
	if a[i]==now:
		odd=not odd
	
	else:
		
		ans+=odd
		
		now=a[i]
		odd=True

print(ans+odd)

Solution (Python):
from collections import Counter
n=int(input())
a=[int(input()) for i in range(n)]
print(sum(map(lambda x: x%2,Counter(a).values())))

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

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

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

now=a[0]
odd=0
ans=0
for i in range(n):
	
	if a[i]==now:
		odd=(odd+1)%2
	
	else:
		
		ans+=odd
		
		now=a[i]
		odd=1

print(ans+odd)

Solution (Python):
import collections

N = int(input())
A = [int(input()) for i in range(N)]

count_dict = collections.Counter(A)



count = 0

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

print(count)

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 main():
    repeat = int(input())
    announced_num = [int(input()) for _ in range(repeat)]
    count = {}
    for number in announced_num:
        if number in count:
            if count[number] % 2:
                count[number] = 0
            else:
                count[number] = 1
        else:
            count[number] = 1
    answer = 0
    for i in count.values():
        answer += i
    print(answer)


if __name__ == '__main__':
    main()

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

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

Solution (Python):




N = int(input().strip())
A_list = [int(input().strip()) for _ in range(N)]

A_dic = {}
A_set =set()

for i in A_list:
    if i not in A_set:
        A_set.add(i)
    else:
        A_set.remove(i)

print(len(A_set))

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):
N=int(input())
A=[]
for i in range(N):
    A.append(int(input()))
B=sorted(A)
ans=0
tmp=B[0]
cnt=1
for i in range(1,N):
    if(tmp==B[i]):
        cnt+=1
    else:
        ans+=(cnt%2)
        cnt=1
        tmp=B[i]
ans+=cnt%2
print(ans)

Solution (Python):
from collections import Counter

n = int(input())
a = []

for _ in range(n):
    a.append(int(input()))

ctr = Counter(a)

ans = len([i[0] for i in ctr.items() if i[1] % 2 == 1])

print(ans)

Solution (Python):

n = int(input())
a = [int(input()) for _ in range(n)]
a.sort()
cnt = 1
ans = 0
for i in range(n-1):
    if a[i] == a[i+1]:
        cnt += 1
    else:
        if cnt %2: ans+= 1
        cnt = 1
print(ans+cnt%2)

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

Solution (Python):
from collections import Counter

n = int(input())
a = [int(input()) for _ in range(n)]
c = Counter(a)
ans = 0
for v in c.values():
    if v % 2 == 0:
        continue
    ans += 1
print(ans)

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

Solution (Python):
import collections

n = int(input())
a = list(int(input()) for i in range(n))

a = dict(collections.Counter(a))
ans = [i for i in a.values() if i%2 == 1]

print(len(ans))

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

d = set()
for _ in range(n):
    d ^= {input()}
    
print(len(d))

Solution (Python):
import collections
n = int(input())
a = [int(input()) for _ in range(n)]
c = list(collections.Counter(a).values())
print(sum([c_i % 2 for c_i in c]))

Solution (Python):
import collections
n=int(input())
count=0
a=[int(input()) for _ in range(n)]
a=collections.Counter(a)

for key,value in a.items():
    if value%2==1:
        count+=1
print(count)

Solution (Python):
def writeanderase(n , a):

    ans = {}
    count = 0

    for i in range(n):
        if a[i] in ans:
            ans[a[i]] += 1
        else:
            ans[a[i]] = 1

    for i in ans.values():
        count += i % 2

    return count

def main():
    n = int(input())
    a = [int(input()) for i in range(n)]
    print(writeanderase(n , a))

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
dic = {}
for i in range(N):
  a = int(input())
  if a in dic:
    dic[a] += 1
  else:
    dic[a] = 1
count = 0
for v in dic.values():
  if v % 2 == 1:
    count += 1
print(count)

Solution (Python):
from collections import Counter
import itertools

N = int(input())
A = [int(input()) for _ in range(N)]
c = Counter(A)
ans = len(list(itertools.filterfalse(lambda x: x % 2 != 1, c.values())))
print(ans)

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

from collections import defaultdict

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

cnt = defaultdict(int)
for a in A:
    if cnt[a]:
        cnt[a] = 0
    else:
        cnt[a] = 1

print(sum(cnt.values()))

Solution (Python):
from collections import Counter
n = int(input())
A = [0]*n
for i in range(n):
    A[i] = int(input())

cA = Counter(A).values()
r = 0
for i in cA:
    r += i%2
print(r)

Solution (Python):
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
from functools import reduce
mod = 10 ** 9 + 7
 

def ii(): return int(sys.stdin.readline().rstrip()) 
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) 
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]

def ss(): return sys.stdin.readline().rstrip() 
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) 
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]





n=ii()
a=lin(n)

arr=Counter(a)
v=list(arr.values())
ans=0
for i in range(len(v)):
    if v[i]%2==1:
        ans+=1
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
n = int(input())
A = [int(input()) for _ in range(n)]
dic = {}
for a in A:
    if dic.get(a,0):
        dic[a] = 0
    else:
        dic[a] = 1
print(sum([v for k,v in dic.items()]))

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

Solution (Python):
def pin(type=int):
    return map(type,input().split())

"""
バケットで管理したかったけど数字が多いのでソートして同じ数を固めることに
"""


N=int(input())
a=[]
for i in range(N):
    a.append(int(input()))
a.sort()
bac=1
ans=0
for j in range(N-1):
    if a[j+1]!=a[j]:
        ans+=bac%2
        bac=1
    else:
        bac+=1
ans+=bac%2
print(ans)

Solution (Python):
'''
全量のリストを用いると検索対象が大きくなってしまうため、ディクショナリで都度追加/削除する
'''

N = int(input())

A = {}

for _ in range(N):
    tmp = int(input())
    if tmp in A:
        del A[tmp]
    else:
        A[tmp] = 1

print(len(A))

Solution (Python):
n = int(input())
dict = {}
for i in range(n):
  tmp = int(input())
  if tmp in dict:
    del dict[tmp]
  else:
    dict[tmp] = 1
    
print(len(dict))

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

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

print(len(set_))

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

Solution (Python):
from collections import Counter
from operator import itemgetter

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

B = Counter(A)
B = list(B.items())
B1 = sorted(B,key=itemgetter(1),reverse = True) 

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

Solution (Python):
from collections import Counter

N = int(input())
d_list = [int(input()) for _ in range(N)]
dlc = Counter(d_list)
ans = 0
for i in dlc.values():
    if i % 2 == 0:
        pass
    else:
        ans += 1

print(ans)

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):
N = int(input())
dct = {}
for _ in range(N):
    x = int(input())
    n = dct.get(x, 0) + 1
    dct[x] = n

ret = 0
for k, v in dct.items():
    if v % 2 == 1:
        ret += 1
print(ret)

Solution (Python):
n = int(input())
ans = 0
dic1 = dict()
for i in range(n):
    a = int(input())
    if a in dic1:
        dic1[a] += 1
    else:
        dic1[a] = 1
for i in dic1.values():
    ans += i%2
print(ans)

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

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

zisyo={}
for i in range(n):
    if a[i] in zisyo:
        zisyo.pop(a[i])
    else:
        zisyo[a[i]]=1
print(len(zisyo))

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

a.sort()

pre = 0
ans = 0
for i in range(n):
    count = 0
    if a[i] != pre:
        for j in range(i,n):
            if a[j] == a[i]:
                count += 1
            else:
                break
        if count % 2 == 0:
            pass
        else:
            ans += 1
        pre = a[i]
print(ans)

Solution (Python):
import collections
N = int(input())
A = [int(input()) for i in range(N)]
cnt = 0
collection = collections.Counter(A)
for i in collection.values():
	if i % 2 == 1:
		cnt+=1
print(cnt)

Solution (Python):
import collections
N = int(input())
A = [int(input()) for i in range(N)]
cnt = 0
collection = collections.Counter(A)
for i in collection.values():
	if i % 2 == 1:
		cnt+=1
print(cnt)

Solution (Python):
from collections import Counter

n = int(input())
ans = 0
b = []

for i in range(n):
    ai = int(input())
    b.append(ai)

c = Counter(b)

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

print(ans)

Solution (Python):

a = int(input())
b = set()
for i in range(a):
	b ^= {input()}
print(len(b))

Solution (Python):
from collections import Counter
import sys

def read():
    return sys.stdin.readline().rstrip()

n = int(read())
a = Counter([int(read()) for _ in range(n)])
print(sum([ai % 2 for ai in a.values()]))

Solution (Python):
from collections import Counter
print(sum([a % 2 for a in Counter([int(input()) for _ in range(int(input()))]).values()]))

Solution (Python):
N = int(input())
A = []
for i in range(N):
    a = int(input())
    A.append(a)

x = dict()
for i in range(N):
    if A[i] in x:
        if x[A[i]] == 1:
            x[A[i]] -=1
        else:
            x[A[i]] += 1
    else:
        x[A[i]] = 1
ans = 0
for idx in x:
    ans += x[idx]
print(ans)

Solution (Python):
N=int(input())
A=[None]*N
for i in range(N):
  A[i]=input()
A.sort()
A.append('x')
cnt=0
c=A[0]
cc=1
for i in range(1,N+1):
  if A[i]==c:
    cc+=1
  else:
    cnt+=cc%2
    c=A[i]
    cc=1
print(cnt)

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

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

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

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


ds = {}
for _ in range(N):
    A = input()
    if A not in ds:
        ds[A] = 0
    else:
        ds[A] += 1

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

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


ds = {}
for _ in range(N):
    A = input()
    if A not in ds:
        ds[A] = 0
    else:
        ds[A] += 1

cnt = 0
for d in ds:
    if ds[d] % 2 == 0:
        cnt += 1

print(cnt)

Solution (Python):
N=int(input())
a =[]
for _ in range(0,N):
    a.append(int(input()))
b =[]
f=0
s=0
a.sort()
for i in range(0,N):
    if i==0:
        b.append(1)
    elif a[i]==a[i-1]:
        if b[f]==1:
            b[f]=0
        else:
            b[f]=1
    else:
        b.append(1)
        f=f+1
for i in range(0,len(b)):
    s=s+b[i]
print(s)

Solution (Python):
n=int(input())
li=[int(input()) for i in range(n)]
import collections
a=collections.Counter(li)
b=a.most_common()
ans=0
for i in range(len(b)):
  if b[i][1]%2==1:
    ans += 1
print(ans)

Solution (Python):
n =  int(input())
dic = dict()
for j in range(n):
  i = int(input())
  if i in dic :
    if dic[i] == 1 :
      dic[i] = 0
    else:
      dic[i] = 1
  else :
    dic[i] = 1
print(sum(dic.values()))

Solution (Python):
N = int(input())
A = []
d = {}
for i in range(N):
    a = int(input())
    d[a] = 0
    A.append(a)
S = []
for i in range(N):
    if d[A[i]] == 0:
        S.append(A[i])
    d[A[i]] += 1
ans = 0
for i in S:
    ans += (d[i]%2)
print(ans)

Solution (Python):
kami = set()
N = int(input())
for x in range(N):
  i = int(input())
  if i in kami:
    kami.remove(i)
  else:
    kami.add(i)
print(len(kami))

Solution (Python):
n=int(input())
list=[]
ans=0
sa=1
sas=0
for i in range(n):
    a=int(input())
    list.append(a)
list=sorted(list)
list.append(10000000000)
for i in range(n+1):
    if i!=0:
        if list[i]==list[i-1]:
            sa+=1
        else:
            sas=sa
            sa=1
            if sas%2!=0:
                ans+=1
print(ans)

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

for i in range(n):
  test = int(input())
  if not(test in aDic.keys()):
    aDic[test] = 1
  elif aDic[test] == 1:
    aDic[test] = 0
  else:
    aDic[test] = 1

print(sum(aDic.values()))

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

Solution (Python):
n = int(input())
paper = {}
for i in range(n):
    number = input()
    if number in paper:
        del paper[number]
    else:
        paper[number] = 1
print(len(paper))

Solution (Python):
import sys


n = int(input())


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

dic = {}

for i in a:
    if i in dic.keys():
        
        dic.pop(i)
    else:
        dic[i] = i
        
print(len(dic))

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

cnt=defaultdict(lambda:0)
for i in a:
    if cnt[i]==0:
        cnt[i]=1
    else:
        cnt[i]=0

cnt=list(cnt.values())
print(cnt.count(1))

Solution (Python):
n = int(input())
al = list(int(input()) for _ in range(n))

s = set()

for a in al:
    s ^= {a}

print(len(s))

Solution (Python):
import math
import calendar
import fractions
import itertools

n = int(input())
a = []
for i in range(n):
    b = int(input())
    a.append(b)
a = sorted(a)
ans = 0
cnt = 0
for i in range(len(a)):
    if i == 0:
        cnt += 1
    else:
        if a[i] == a[i - 1]:
            cnt += 1
        else:
            if cnt % 2 == 1:
                ans += 1
                cnt = 1
            else:
                cnt = 1
if cnt % 2 == 1:
    ans += 1
print(ans)

Solution (Python):
import sys
n = int(input())
ans = []
for i in range(n):
    ans.append(int(input()))
ans.sort()
key = ans[0]
count = 1
ans_sum = 0
if len(ans) == 1:
    print(1)
    sys.exit()
for i in range(1,n):
    if key != ans[i]:
        key = ans[i]
        if count%2 == 0:
            count = 1
        else:
            count = 1
            ans_sum += 1
    else:
        count += 1
if count%2 == 0:
    count = 1
else:
    ans_sum += 1
print(ans_sum)

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

paper = []
numbers = sorted([int(input()) for _ in range(N)])


for i in range(N - 1):
    if numbers[i] == numbers[i + 1]:
        numbers[i] = -1
        numbers[i + 1] = -1
    if numbers[i] != -1:
        paper.append(numbers[i])

if numbers[N - 1] != -1:
    paper.append(numbers[N - 1])
print(len(paper))

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

for i in range(n):
  number = input()
  if number in paper:
    del paper[number]
  else:
    paper[number] = 1;

print(len(paper))

Solution (Python):
n = int(input())
num_dict = dict()
for i in range(n):
    num = int(input())
    num_dict.setdefault(num, 0)
    num_dict[num] = (num_dict[num]+1)%2

print(sum([x for x in num_dict.values()]))

Solution (Python):
N = int(input())
d = {}
for _ in range(N):
    a = int(input())
    d[a] = d.setdefault(a, 0) + 1

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

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

for i in range(n):
    a = int(input())
    if a in ans:
        ans.remove(a)
    else:
        ans.add(a)

print(len(ans))

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

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

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):
from collections import defaultdict

def solve(n, A):
    d = defaultdict(lambda: False)
    count = 0
    for a in A:
        if not d[a]:
            d[a] = True
            count += 1
        else:
            d[a] = False
            count -= 1
    return count

_n = int(input())
_A = [int(input()) for _ in range(_n)]
print(solve(_n, _A))

Solution (Python):
import collections

N = int(input())
lst = [int(input()) for i in range(N)]

cc = dict(collections.Counter(lst))
ans = 0
for i in cc.values():
  if (i % 2 != 0):
    ans += 1
print(ans)

Solution (Python):
n = int(input())
nums = [int(input()) for _ in range(n)]
cnt = {}
ans = 0
for x in nums:
    if x not in cnt:
        cnt[x] = 1
    else:
        cnt[x] += 1
for y in cnt.values():
    if y % 2 != 0:
        ans += 1

print(ans)

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

a.sort()
ans=0
m=1

for i in range(1,n):
    if a[i-1] == a[i]:
        m+=1
    else:
        ans+=(m%2)
        m=1

ans+=(m%2)

print(ans)

Solution (Python):
from collections import defaultdict
n = int(input())
nums = [input() for _ in range(n)]

d = defaultdict(int)

for num in nums:
    d[num] += 1

ans = len([i for i, j in d.items() if j % 2 != 0])
print(ans)

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

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

numberdict = dict()
for i in range(N):
    A_i = int(input())
    if A_i in numberdict:
        numberdict[A_i] += 1
    else:
        numberdict[A_i] = 1
ans = 0
for j in numberdict.keys():
    if numberdict[j] % 2 == 1:
        ans += 1
print(ans)

Solution (Python):
from collections import defaultdict


dict = defaultdict(int)
n = int(input())
for _ in range(n):
    a = int(input())
    dict[a] += 1

ans = 0
for num, count in dict.items():
    if count % 2 == 1:
        ans += 1

print(ans)

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

A = {}

for i in range(N):
    Ai = int(input())
    if Ai in A:
        A.pop(Ai)
        
    else :
        A[Ai] = 1

print(len(A))

Solution (Python):

from itertools import permutations, combinations
from fractions import gcd
from collections import Counter
from math import sqrt
import sys
input = sys.stdin.readline
def lcm(x, y):
    return (x*y//gcd(x, y))
def small_letters():
    return [chr(i) for i in range(97, 97+26)]
def capital_letters():
    return [chr(i) for i in range(65, 65+26)]


def main():
    """ここに書いてね"""
    N = int(input())
    A_list = [int(input()) for i in range(N)]
    ans = 0
    counter = Counter(A_list)
    for i in counter.values():
        if i % 2 == 1:
            ans += 1
    print(ans)

if __name__ == '__main__':
    main()

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


import collections

counter = collections.Counter(Numbers)



ans = 0

for i in counter.values():
    if i % 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)
ans = 0
for i in c:
    if c[i]%2 == 1:
        ans += 1
print(ans)

Solution (Python):

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

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

cnt = 0
now = -1
ans = 0
for a in v:
    if a == now:
        cnt += 1
    else:
        ans += cnt % 2
        now = a
        cnt = 1

ans += cnt % 2
print(ans)