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())
L=[0]*N
for i in range(N):
    L[i]=int(input())
L.sort()
ans=0
count=0
past=L[0]
for i in range(0,N):
    if L[i]==past:
        count+=1
    else:
        past=L[i]
        ans+=count%2
        count=1

print(ans+count%2)

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

Solution (Python):
N = int(input())
lst = [0]
for i in range(N):
	lst += [int(input())]

lst.sort()

lst += [0]
ans = 0
count = 0
for i in range(1,N+2):
	if lst[i] != lst[i-1]:
		ans += count%2
		count = 1
	else:
		count += 1	
print (ans)

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

Solution (Python):



from collections import defaultdict

N = int(input())

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

count = 0
for key in d.keys():
    if d[key] % 2 == 1:
        count += 1
        
print(count)

Solution (Python):
N = int(input())
para = {}
for i in range(N):
    a = int(input())
    if not a in para.keys() :
        para[a] = 1
    else : para[a] += 1
ans = []
def judge(a) :
    for i in a.keys():
        if a[i] % 2 == 0 : pass
        else : ans.append(1)
    return sum(ans)

print("{}".format(judge(para)))

Solution (Python):
n=int(input())
l=[int(input()) for i in range(n)]
dic={}
for i in set(l):
	dic[i]=0
for i in l:
	dic[i]+=1
cnt=0
for v in dic.values():
	if v%2==1:cnt+=1
print(cnt)

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

ans = 0
dic = {}

for a in A:
    if a in dic:
        dic[a] = (dic[a]+1)%2
    else:
        dic[a] = 1
print(sum(list(dic.values())))

Solution (Python):

import sys
def input(): return sys.stdin.readline().rstrip()
def mi(): return map(int, input().split())


N = int(input())

nset = set()

for _ in range(N):
  i = int(input())
  if i in nset: nset.remove(i)
  else: nset.add(i)

print(len(nset))

Solution (Python):

import sys


def solve(N: int, A: "List[int]"):
    s = set()
    for a in A:
        if a in s:
            s.remove(a)
        else:
            s.add(a)
    ret = len(s)
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    A = [ int(next(tokens)) for _ in range(N) ]  
    solve(N, A)

if __name__ == '__main__':
    main()

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7

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

def main():
  n=I()

  l=[I() for _ in range(n)]

  l.sort()

  l2=[]
  for x in l:
    if len(l2)>0:
      if x==l2[-1]:
        l2.pop()
      else:
        l2.append(x)
    else:
      l2.append(x)

  return len(l2)

print(main())

Solution (Python):











import sys
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict
inf=float('inf')
mod = 10**9+7
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N = I()
    A = set()
    for _ in range(N):
        a = I()
        if a in A:
            A.remove(a)
        else:
            A.add(a)
    print(len(A))
if __name__ == '__main__':
    main()

Solution (Python):


def do():
    di = {}
    N = int(input())
    for _ in range(N):
        temp = int(input())
        if temp not in di:
            di[temp] = 1
        else:
            di[temp] += 1
    ans = 0
    for k,v in di.items():
        if v % 2 == 1:
            ans += 1
    print(ans)



if __name__ == "__main__":
    do()

Solution (Python):
N = int(input())
numbers = []
for i in range(0, N):
	numbers.append(int(input()))
numbers.sort()
ans = 0
tmp = 0
cnt = 0
for i in range(0, N):
	if numbers[i] != tmp:
		ans += cnt%2
		cnt = 0
		tmp = numbers[i]
	cnt += 1
ans += cnt%2
print(ans)

Solution (Python):
l = input().split()
N = int(l[0])
A = []

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



B = {}
for a in A:
    if a not in B:
        B[a] = 1
    else:
        B[a] += 1

sum = 0
for b in B:
    sum += B[b] % 2

print(sum)

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

a_dict = {}
for i in range(N):
  t = int(input())
  if t in a_dict:
    a_dict[t] += 1
  else:
    a_dict[t] = 1
print(len([0 for i in a_dict.values() if i % 2]))

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

print(ans)

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

print(len(A))

Solution (Python):



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):
from collections import Counter
n = int(input())
a = [int(input()) for _ in range(n)]

cnt = Counter(a).values()


flg = 0
for i in cnt:
    if i%2 == 1:
        flg += 1

print(flg)

Solution (Python):
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):
import collections
import sys
input = sys.stdin.readline

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

Solution (Python):
from collections import Counter
N = int(input())
A = []

for i in range(N):
  tmp = int(input())
  A.append(tmp) 
B = Counter(A).values()
cnt = 0
for i in B:
  if i % 2 != 0:
    cnt += 1
  
print(cnt)

Solution (Python):
n = int(input())
A = [int(input()) for i in range(n)]
dict_a = {}
for a in A:
  dict_a.setdefault(a, 0)
  if dict_a[a] == 1:
    dict_a.pop(a)
  else:
    dict_a[a] += 1
print(len(dict_a))

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

Solution (Python):
from collections import Counter

n = int(input())
arr = Counter([input() for _ in range(n)])
print(sum(1 if count%2 else 0 for count in arr.values()))

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

Solution (Python):
from collections import defaultdict

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

d = defaultdict(int)

for a in A:
  d[a] ^= 1

answer = sum(d.values())
print(answer)

Solution (Python):

import sys
input = sys.stdin.readline

n = int(input())
arr = set()
for _ in range(n):
    m = int(input())
    if m in arr:
        arr.remove(m)
    else:
        arr.add(m)
print(len(arr))

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

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

a = sorted(a)


temp = a[0]
c = 0

cnts = [0]*n

for i in a:
    if temp == i:
        cnts[c] += 1
    
    else:
        temp = i
        c += 1
        cnts[c] += 1

ans = 0

for i in cnts:
    if i%2 == 1:
        ans += 1

print(ans)

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

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

a = sorted(a)


temp = a[0]
c = 0

cnts = [0]*n

for i in a:
    if temp == i:
        cnts[c] += 1
    
    else:
        temp = i
        c += 1
        cnts[c] += 1

ans = 0

for i in cnts:
    if i == 0:
        break

    if i%2 == 1:
        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,j in D.items():
    if j%2==1:
        ans+=1
print(ans)

Solution (Python):

from bisect import bisect_left, bisect_right
import sys


def count(seq, element):
    "Return number of occurrences of item"
    i = bisect_left(seq, element)
    j = bisect_right(seq, element)
    return seq[i:j].count(element)


def solve(N: int, A: "List[int]"):
    ans = 0
    seta = sorted(list(set(A)))
    sa = sorted(A)
    for a in seta:
        if count(sa, a) % 2 != 0:
            ans += 1
    print(ans)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  
    A = [int(next(tokens)) for _ in range(N)]  
    solve(N, A)


if __name__ == "__main__":
    main()

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

print(sum(a.values()))

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

def main():
    d = {}
    for _ in range(N):
        n = input()
        if not n in d.keys():
            d[n] = 0
        d[n] += 1
    
    ans = sum(map(lambda v: v % 2, d.values()))
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
from collections import Counter
N, *A = map(int, open(0).read().split())
print(sum([1 for v, c in Counter(A).most_common() if c % 2 == 1]))

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

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

count=0
for cnt in dicCnt.values():
  if cnt%2!=0:
  	count+=1
print(count)

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

from collections import Counter
A=Counter(A)
print(sum([1 for a in A.keys() if A[a]%2==1]))

Solution (Python):
from collections import Counter

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

A_cnt = list(Counter(A).values())
A_cnt_parity = list(map(lambda x: x%2, A_cnt))
ans = A_cnt_parity.count(1)

print(ans)

Solution (Python):
N = int(input())
di = {}
for _ in range(N):
    i = int(input())
    if(i in di):
        del di[i]
    else:
        di[i]=1
print(len(di))

Solution (Python):
from collections import Counter
l=[int(input()) for i in range(int(input()))]
ca=Counter(l).most_common()
x=0
for i,j in ca:
    if j%2==1:x+=1
print(x)

Solution (Python):
from collections import Counter
n = int(input())
a = Counter(list(int(input()) for i in range(n)))
print(sum(x % 2 != 0 for x in a.values()))

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

Solution (Python):
from collections import Counter

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

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

Solution (Python):
import sys
a =set()
n = int(sys.stdin.readline())
for _ in range(n):
    tmp = int(sys.stdin.readline()) 
    if tmp in a:
        a.remove(tmp)
    else:
        a.add(tmp)
print(len(a))

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

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

Solution (Python):
N = int(input())
lst_a = [int(input()) for _ in range(N)]
lst_a.sort()
set_ans = set()


for a in lst_a:
    if a in set_ans:
        set_ans.remove(a)
    else:
        set_ans.add(a)
ans = len(set_ans)


print(ans)

Solution (Python):
from collections import defaultdict
d = defaultdict(int)

N = int(input())
for _ in range(N):
	d[int(input())] += 1

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

print(cnt)

Solution (Python):
from collections import Counter


N = int(input())
lst_number = [int(input()) for _ in range(N)]
set_number = set(lst_number)
cnt_number = Counter(lst_number)
ans = 0


for key in set_number:
    if cnt_number[key] % 2 == 1:
        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] = (d[A]+1) % 2
print(sum(d.values()))

Solution (Python):
n = int(input())
count = {}
for _ in range(n):
    a = int(input())
    if a not in count:
        count[a] = 1
    else:
        count[a] = 1 - count[a]
ans = 0
for i, c in count.items():
    ans += c
print(ans)

Solution (Python):
N = int(input())
dic = {}
for _ in range(N):
    A = int(input())
    if A in dic:
        dic.pop(A)
    else:
        dic[A] = 1
print(len(dic))

Solution (Python):
import collections
N = int(input())
A = [int(input()) for _ in range(N)]
L = collections.Counter(A).most_common()
ans = 0
for item,num in L:
    if num % 2 != 0:
        ans += 1
print(ans)

Solution (Python):
import collections
N = int(input())
A = [int(input()) for _ in range(N)]
L = collections.Counter(A).most_common()
ans = 0
for item,num in L:
    if num % 2 != 0:
        ans += 1
print(ans)

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

print(len(a))

Solution (Python):


import math
from collections import defaultdict


An = defaultdict()
for _ in range(int(input())):
  i = int(input())
  if i not in An:
    An[i] = 1
  else:
    An[i] += 1

ans = 0
for i in An:
  ans += An[i]%2
print(ans)

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

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

Solution (Python):
import sys
N = int(input())
A = [int(input()) for _ in range(N)]
A.sort()
stack = A[0]
count_num = 1
ans = 0
for i in range(1,N):
        if A[i] == stack:
                count_num += 1
        else:
                if count_num % 2 == 1:
                        ans += 1
                count_num = 1
        stack = A[i]
if count_num%2 == 1:
        ans +=1
print(ans)

Solution (Python):
n=int(input())
l=[]
for i in range(n):
  m=int(input())
  l.append(m)
l=sorted(l)
c=0
d=1
e=l[0]
for i in range(1,n):
  if l[i]!=e:
    if d%2==1:
      c+=1
    e=l[i]
    d=1
  else:
    d+=1
if d%2==1:
  c+=1
print(c)

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


for i in range(n):
  a=input()
  if a in mydict:
    del mydict[a]
  else:
    mydict[a]=1
    
print(len(mydict))

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

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

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

mylist=mydict.values()

print(sum(mylist))

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

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

l.sort()

for i in range(1,n):
    if l[i] == l[i-1]:
        l[i] = 0
        l[i-1] = 0

print(len(l) - l.count(0))

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

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

s = set()

for v in L:
    if v in s:
        s.remove(v)
    else:
        s.add(v)
        
print(len(s))

Solution (Python):


def solve():
    """ 
    dic[a] := 数字aが紙に書かれているか否か（True/False）
    """
    N = int(input())
    dic = {}
    for i in range(N):
        a = int(input())
        if not a in dic:
            dic[a] = True
            continue
        if dic[a] == True:
            dic[a] = False
        else:
            dic[a] = True
    
    ans = 0
    for key in dic:
        if dic[key]: ans += 1
    print(ans)

if __name__ == "__main__":
    solve()

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

m = {}
for a in A:
	if not a in m:
		m[a] = 1
	else:
		del m[a]

print(len(m))

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

Solution (Python):
N = int(input())
dic = {} 
for i in range(N):
  num = int(input())
  if dic.get(num) is None:
    dic[num] = 1
  else:
    dic[num] += 1
ans = 0
for k in dic:
  if dic[k] %2 != 0:
    ans += 1
print(ans)

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

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

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

Solution (Python):
from collections import Counter


N = int(input())
A = []
for i in range(N):
    A.append(int(input()))
A_cnt = Counter(A)
ans_sum = 0
for key, val in A_cnt.items():
    if val % 2 == 1:
        ans_sum += 1
print(ans_sum)

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

paper = set()
for a in A:
    paper ^= {a}

print(len(paper))

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

A.sort()

result = 0
cur = 0
while cur < N:
    a = A[cur]
    count = 0
    while cur < N and A[cur] == a:
        cur += 1
        count += 1
    result += count % 2

print(result)

Solution (Python):
from collections import Counter

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

count = 0
for v in Counter(A).values():
    if v % 2 == 1:
        count += 1
print(count)

Solution (Python):
N = int(input())
d = {}
for i in range(N):
    a = int(input())
    d[a] = 1 - d.get(a,0)
print(sum(d.values()))

Solution (Python):
from collections import Counter

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

A = Counter(A).most_common()

count = 0
for i, j in A:
    if j % 2 == 1:
        count += 1

print(count)

Solution (Python):
N = int(input())
A = [int(input()) for _ in range(N)]
A.sort()
A.append(10**9+1)

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

print(ans)

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

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

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

Solution (Python):
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):

def read_input():
    n = int(input())
    alist = []

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

    return n, alist


def submit():
    n, alist = read_input()

    paper = {a: -1 for a in alist}

    for a in alist:
        paper[a] *= -1

    paper_write = [t for t in paper.items() if t[1] == 1]
    print(len(paper_write))

if __name__ == '__main__':
    submit()

Solution (Python):
N = int(input())
d = {}
for i in range(N):
    a = input()
    if not(a in d.keys()):
        d[a] = 0
    d[a] += 1

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

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

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

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

target = {}
 
for i in A:
    if i in target:
        target[i] += 1
    else:
        target[i] = 1

ans = 0
for i in target:
    if target[i] % 2 == 0:
        continue
    else:
        ans += 1
print(ans)

Solution (Python):
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    n = f()[0]
    s = set()
    for i in range(n):
        x = f()[0]
        if x not in s:
            s.add(x)
        else:
            s.remove(x)
    
    print(len(s))


solve()

Solution (Python):
from functools import reduce
import collections
import math

def main():
    
    
    
    

    
    
    
    
    
    

    
    

    
    
    
    
    
    
    
    
    
    INF = float("inf")

    
    MOD = 10**9+7
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    N = int(input())
    a = []
    d = collections.defaultdict(int)
    for i in range(N):
        a.append(int(input()))
        d[a[i]] +=1
    ans = 0
    for d_i in d.items():
        if d_i[1] % 2 ==1:
            ans +=1
    print(ans)
    
if __name__ == '__main__':
    main()

Solution (Python):
from collections import Counter
N=int(input())
A=[int(input()) for _ in range(N)]
c=list(Counter(A).most_common())
ans=0
for a,b in c:
    if b%2!=0:
        ans+=1
    else:
        continue
print(ans)

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):
s={0}
for _ in[0]*int(input()):
  t=int(input())
  if t in s:s-={t}
  else:s|={t}
print(len(s)-1)

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

target = {}

for i in A:
    if i in target:
        target[i] += 1
    else:
        target[i] = 1

ans = 0
for i in target:
    if target[i] % 2 == 0:
        continue
    else:
        ans += 1

print(ans)

Solution (Python):
from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions
import itertools
import copy
import collections
from operator import itemgetter

def j(q):
    if q==1: print("Yes")
    else:print("No")
    exit(0)


def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")

def ip():
    return int(input())
def printrow(a):
    for i in range(len(a)):
        print(a[i])
def combinations(n,r):
    if n<r:return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def permutations(n,r):
    if n<r:return 0
    return math.factorial(n) // math.factorial(n - r)

n = ip()                                     





a=[ip() for i in range(n)]    




a.sort()
s = 0
cnum = a[0]
csum = 1
for i in range(1,n):
    if a[i] == cnum:
        csum+=1
    else:
  
        cnum = a[i]
        s+=(csum%2)
        csum=1
  
s+=(csum%2)
print(s)

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):
from sys import exit, stdin
from collections import Counter
N = int(stdin.readline().rstrip())
A = Counter(int(stdin.readline().rstrip()) for _ in range(N))
print(len(Counter(a for a in A.elements() if A[a] % 2 == 1)))

Solution (Python):
N = int(input())
A = []
for i in range(N):
    A.append(int(input()))
As = sorted(A)
num = 0
i = 0
while i < N:
    count = 0
    j = As[i]
    while i < N and As[i] == j:
        count += 1
        i += 1
    if count % 2 == 1:
        num += 1
print(num)

Solution (Python):
import itertools

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

print(sum(sum(1 for _ in group) % 2 for key, group in itertools.groupby(sorted(a))))

Solution (Python):
N = int(input())
d = dict()
for i in range(N):
    a = int(input())
    if a in d.keys():
        d.pop(a)
    else:
        d[a] = 1

print(len(d))

Solution (Python):
from collections import Counter

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

c = list(Counter(A).items())

ans = 0
for i in c:
    if i[1] % 2:
        ans += 1

print(ans)

Solution (Python):
from collections import Counter as ct
N=int(input())
A=[int(input()) for i in range(N)]
B=ct(A)
ans=0
for b,n in B.items():
    if n%2:ans+=1
print(ans)

Solution (Python):
from collections import Counter as ct
N=int(input())
A=[int(input()) for i in range(N)]
B=ct(A)
ans=0
for b,n in B.items():
    if n%2:ans+=1
print(ans)

Solution (Python):
_,*s=open(0)
a=set()
for i in s:a^={i}
print(len(a))

Solution (Python):
_,a,*s=open(0)
a={a}
for i in s:a^={i}
print(len(a))

Solution (Python):
from collections import*
n,*a=map(int,open(0).read().split())
print(sum(v%2 for v in Counter(a).values()))

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

if N == 1:
    print(1)
    exit()

a.sort()
ans = 0
tmp = a[0]
a = a[1:]
count = 1
for aa in a:
    if aa == tmp:
        count += 1
    else:
        if count % 2 == 1:
            ans += 1
        tmp = aa
        count = 1
if count % 2 == 1:
            ans += 1

print(ans)

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

Solution (Python):
n=int(input())
S=set()
for i in range(n):
  S^=set([input()])
print(len(S))

Solution (Python):
n=int(input())
arr=[int(input()) for _ in range(n)]
arr=sorted(arr)
dic={}
for i in arr:
  if i in dic:
    dic[i]+=1
  else:
    dic[i]=1
count=0
for i in dic:
  if dic[i]%2==1:
    count+=1
print(count)

Solution (Python):

import copy
import numpy as np
import random
import bisect 
import math

N = int(input())

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


paper = {}
for i in range(N):
    if A[i] in paper.keys():
        paper[A[i]] += 1
    else:
        paper[A[i]] = 1

cnt = 0
for key in paper.keys():
    if paper[key] %2 == 0:
        pass
    else:
        cnt += 1


print(cnt)

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

for i in range(n):
    s ^= {int(input())}

print(len(s))

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 i in range(N):s^={input()}
print(len(s))

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

import bisect

def main():
    n = int(input())
    s = []

    for i in range(n):
        a = int(input())
        i = bisect.bisect_left(s, a)
        if len(s) > i and s[i] == a:
            s.remove(a)
        else:
            s.insert(i, a)


    print(len(s))


main()

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

ans=0
cnt=1
for i in range(a-1):
  if li[i+1]==li[i]:
    if cnt==1:
      cnt=0
    else:
      cnt=1
  else:
    if cnt==1:
      ans+=1
    else:
      cnt=1

if cnt==1:
  ans+=1

print(ans)

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

Solution (Python):
X=0
hoge=1
N=int(input())
NUM_list = list(int(input()) for i in range(N))
NUM_list.sort()
for i in range(N-1):
   if NUM_list[i]==NUM_list[i+1]:
      hoge+=1
   else:
      X += hoge%2
      hoge=1
X+=hoge%2

print(X)

Solution (Python):
N = int(input())
A = list(int(input()) for i in range(N))
A.sort()
count = 0
for i in range(N-1):
    if A[i] == A[i+1]:
        A[i] = A[i+1] = 0
for i in range(N):
    if A[i] != 0:
        count += 1
print(count)

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

Solution (Python):
from collections import Counter

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

c = Counter(t)
ans = sum([int(x%2==1) for x in c.values()])

print(ans)

Solution (Python):
n=int(input())
S=set()
for i in range(n):
  S^=set([input()])
print(len(S))

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

    memo=a[i]
print(ans)

Solution (Python):
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def pf(s): return print(s, flush=True)

N=I()
A=[I() for i in range(N)]
counts = collections.Counter(A)
ans=0
for i in counts.values():
    if i%2 == 1: 
        ans += 1
print(ans)

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

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

print(len(paper))

Solution (Python):
import collections

n = int(input())

A = [0] * n
for i in range(n):
    A[i] = int(input())


d = [k for k, v in collections.Counter(A).items() if v%2 != 0]

print(len(d))