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):
from collections import Counter
N = int(input())
As = Counter([int(input()) for i in range(N)])
ans=0
for x,y in As.items():
    if y%2!=0:
        ans+=1
print(ans)

Solution (Python):


from collections import Counter

def main(N,A):
    elements = sorted(set(A))
    A = Counter(A)
    count = 0
    for i in elements:
        if(A[i]%2==1):
            count += 1
    print(count)
    
if __name__ == '__main__':
    N = int(input())
    A = []
    for i in range(N):
        A.append(int(input()))
    main(N,A)

Solution (Python):
import sys
from collections import Counter


def main():
    count_by_kw = Counter()
    n = int(input())
    for _ in range(n):
        count_by_kw[int(sys.stdin.readline())] += 1

    ans = 0
    for key, value in count_by_kw.items():
        if value % 2 == 1:
            ans += 1
    print(ans)


if __name__ == '__main__':
    main()

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

Solution (Python):
from collections import Counter
N = int(input())
c = Counter([int(input()) for s in range(N)])
ans = [v % 2 for v in c.values()].count(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):
from collections import Counter

nums = int(input())
counter = Counter(int(input()) for _ in range(nums))

res = 0
for p in counter.most_common():
  res += (1 if p[1] % 2 == 1 else 0)
print(res)

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

Solution (Python):


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

    B = set()
    for a in A:
        if a not in B:
            B.add(a)
        else:
            B.remove(a)

    print(len(B))

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

Solution (Python):
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7

N = int(sys.stdin.readline())
A = [int(sys.stdin.readline()) for _ in range(N)]

s = set()
for a in A:
    if a in s:
        s.remove(a)
    else:
        s.add(a)
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())

d = {}

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

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

Solution (Python):
from collections import defaultdict



cnt = defaultdict(int)


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




print(sum([i%2 for i in cnt.values()]))

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

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



check = [0]
for i in range(1, N):
    if A[i] != A[i-1]:
        check.append(i)
check.append(N)

l = []
for i in range(1, len(check)):
    tmp = check[i] - check[i-1]
    l.append(tmp)



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

print(ans)

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

print(len(d))

Solution (Python):
N = int(input())
p = []

for i in range(N):
    p.append(input())

p.sort()
c = 1
ans = 0
for i in range(1, len(p)):
    if p[i] == p[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())
li = [int(input()) for _ in range(n)]
li.sort()
tmp = 0
new_li = []
for l in li:
    if l != tmp:
        tmp = l
        new_li.append(1)
    elif l == tmp:
        new_li[-1] += 1
count = 0
for n in new_li:
    if n%2 != 0:
        count += 1
print(count)

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

for i in range(N):
    a = str(input())
    if a in d:
        d[a] += 1
    else:
        d[a] = 1

ans = 0
for v in d.values():
    if (v & 1) == 1:
        ans += 1

print(ans)

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

Solution (Python):
import collections
N = int(input())
num = []
for _ in range(N):
	num.append(input())
count_dict = collections.Counter(num)
d =[]
for k,v in count_dict.items():
  d.append([k,v])

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

Solution (Python):
from collections import Counter

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

Solution (Python):
from collections import defaultdict

N = int(input())

numList = defaultdict(int)

for _ in range(N):
    num = int(input())

    if numList[num] == 0:
        numList[num] = 1
    else:
        numList[num] = 0

ans = sum([c for _, c in numList.items()])
print(ans)

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

for _ in range(n):
    key = input()
    if key in dic:
        del dic[key]
    else:
        dic[key] = 1

print(len(dic.keys()))

Solution (Python):
from collections import*
_,*l=map(int,open(0).read().split())
c=Counter(l)
a=0
for i in c.values():a+=i%2
print(a)

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

d = {}
for i in range(n):
    if a[i] in d:
        d[a[i]] += 1
    else:
        d[a[i]] = 1
count = 0
for i in d.keys():
    if d[i]%2 ==1:
        count +=1
print(count)

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

print(len(list(filter(lambda x: x % 2 != 0, A.values()))))

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

counter = Counter()
for _ in range(N):
    counter[input()] += 1
ans = 0
for v in counter.values():
    ans += v % 2
print(ans)

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

N = int(input())
 
a = {}
for i in range(N):
    x = input()
    if x in a:
        del a[x]
    else:
        a[x] = 0
print(len(a))

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

a = {}
for i in range(N):
    x = input()
    if x in a:
        del a[x]
    else:
        a[x] = 0
print(len(a))

Solution (Python):
n = int(input())
a = []
for i in range(n):
  a.append(int(input()))
a.sort()
ans = 0
for i in range(n):
  try:
    if a[i-1] != a[i]:
      ans += cnt
      cnt = 1
    else:
      cnt = 1 - cnt
  except:
    
    cnt = 1
  
ans += cnt
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):
import collections

N = int(input())
A = [input() for _ in range(N)]
c = collections.Counter(A)
ans = 0

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

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

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

count = 0
dic = {}

for i in a:
    if i in dic:
        dic[i] += 1
    else:
        dic[i] = 1

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

print(count)

Solution (Python):
from collections import Counter

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

ans = 0
cnt = Counter(lst)

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

print(ans)

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

Solution (Python):

import sys, math, fractions, itertools, collections


def solve(N: int, A: "List[int]"):
    c = collections.Counter(A)
    d = list(c.values())
    print(len([dd for dd in d if dd % 2 == 1]))
    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 sys
input = sys.stdin.readline
a = int(input())
c = [int(input()) for i in range(a)]

from collections import defaultdict
d = defaultdict(int)
for i in c:
    d[i] += 1
cnt = 0
for v in d.values():
    cnt +=  v%2
print(cnt)

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

s=set()

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

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

    d = {}
    for a in A:
        d[a] = d.get(a, 0)+1

    print(sum(v % 2 for k, v in d.items()))
main()

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

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

print(len(se))

Solution (Python):

import sys
from bisect import bisect_left
INF = float("inf")


def solve(N: int, A: "List[int]"):
    X = []
    for a in A:
        i = bisect_left(X, a)
        if i < len(X) and X[i] == a:
            X.pop(i)
        else:
            X.insert(i, a)
    print(len(X))

    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 collections
N = int(input())
A = [int(input()) for _ in range(N)]
c = collections.Counter(A)
ans = 0
for i in c.values():
    if i % 2 != 0:
        ans += 1
print(ans)

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

count = {}
ans = 0

for i in range(N):
    a = int(input())
    v = count.get(a,0)
    v = v+1
    if(v%2 == 0):
        ans = ans - 1
    else:
        ans = ans + 1
    count[a] = v

print(ans)

Solution (Python):
import collections

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

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

print(cnt)

Solution (Python):
import collections

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

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

print(cnt)

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

Solution (Python):

import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import math






def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    N = inputInt()
    ans = {}
    for _ in range(N):
        tmp = inputInt()
        if tmp in ans:
            ans[tmp] += 1
        else:
            ans[tmp] = 1
        
    o = 0
    for v in ans.values():
        if v % 2 == 1:
            o += 1
    print(o)
        
            	
if __name__ == "__main__":
	main()

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

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

print(len(a))

Solution (Python):
N = int(input())
dict = {}
for _ in range(N):
  num = int(input())
  if num in dict:
    dict[num] += 1
  else:
    dict[num] = 1
    ans = 0
for key, value in dict.items():
  if value%2 == 1:
    ans += 1
print(ans)

Solution (Python):
import sys
import collections

n = int(sys.stdin.readline())
a_list = [int(x) for x in sys.stdin.readlines()]
a_list_counter = collections.Counter(a_list)
count = 0
for i in a_list_counter:
    if a_list_counter[i] % 2 != 0:
        count += 1
    else:
        continue
print(count)

Solution (Python):
n=int(input())
a=[int(input()) for _ in [0]*n]
s=set()
for x in a:s^={x}
print(len(s))

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

    paper = set()

    for i in range(N):
        A = int(input())
        if A in paper:
            paper.discard(A)
        else:
            paper.add(A)
    
    print(len(paper))

main()

Solution (Python):



N = int(input())
ans = set()

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

Solution (Python):
import collections

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

cnt = 0
for key, value in A.items():
    if value % 2 == 0:
        pass
    else:
        cnt += 1

print(cnt)

Solution (Python):
n = int(input())
set_a = set()
for i in range(n):
    a = int(input())
    if a not in set_a:
        set_a |= {a,}
    else:
        set_a -= {a,}
print(len(set_a))

Solution (Python):
import collections 

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

B = collections.Counter(A)

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

print(ans)

Solution (Python):
N = int(input())
A = []
for i in range(N):
    A.append(int(input()))
    
A.sort()
count = 1
EraseFlag = True
for i in range(1,N):
    if A[i] == A[i-1]:
        if EraseFlag:
            count -=1
            EraseFlag = False
            continue
        else:
            count+=1
            EraseFlag = True
            continue
    else:
        count+=1
        EraseFlag = True
        
print(count)

Solution (Python):
a = {}
b = int(input())
for i in range(b):
    c = int(input())
    if c not in a:
        a[c] = True
    else:
        a[c] = not a[c]
d = 0
for v in a.values():
    if v:
        d += 1
print(d)

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

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

res = 0
cnt = 0
if N == 1:
    res = 1
for i in range(N):
    if i == 0:
        cnt = 1
    else:
        if A[i-1]==A[i]:
            cnt += 1
            if i == N-1:
                res += cnt%2
        else:
            res += cnt%2
            cnt = 1
            if i == N-1:
                res += 1
print(res)

Solution (Python):


import math

n = int(input())

t=[]
for i in range(0,n):
	t.append(0)
for i in range(0,n):
    t[i] = int(input())
t.sort()

sum=0
tmp=t[0]
tmpnum=1
for i in range(1,n):
	if(t[i]==tmp):
		tmpnum+=1
	else:
		tmp=t[i]
		sum+=tmpnum%2
		tmpnum=1
	if(i==n-1):
		sum+=tmpnum%2
print(sum)

Solution (Python):
import collections
n=int(input())
l=[int(input()) for _ in range(n)]
c=collections.Counter(l)
mc=c.most_common()
print(sum([i[1]%2==1 for i in mc]))

Solution (Python):
a = int(input())
b = {}
for i in range(a):
    c = int(input())
    if c not in b:
        b[c] = 1
    else:
        b[c] += 1
c = 0
for k, v in b.items():
    if v % 2 != 0:
        c += 1
print(c)

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

a_c = Counter(a)
a_v = list(a_c.values())

cnt = 0
for a_item in a_v:
    if a_item % 2 == 1:
        cnt += 1

print(cnt)

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

Solution (Python):
import sys

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



if __name__ == "__main__":
    main()

Solution (Python):
from collections import defaultdict
import sys
n = int(input())
a = tuple(map(int,sys.stdin))
d = defaultdict(int)
for i in a:
  d[i] += 1
c = 0
for i in d.values():
  if i % 2 == 1:
    c += 1
print(c)

Solution (Python):
import collections
N=int(input())
A=[int(input()) for _ in range(N)]
AA=collections.Counter(A)
AA=sorted(list(AA.items()))
ans=0
for i,j in AA:
  if j%2!=0:
    ans+=1
print(ans)

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

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

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

counter_hash = {}


for i in A:
        if i in counter_hash:
                counter_hash[i] = (counter_hash[i] + 1) % 2
        else:
                counter_hash[i] = 1
        
print(sum(counter_hash.values()))

Solution (Python):



from collections import Counter
n = int(input())
a = [int(input()) for _ in range(n)]

a = Counter(a)
a = list(a.items())

ans = 0
for i,j in a:
    if j % 2 == 0:
        continue
    else:
        ans += 1

print(ans)

Solution (Python):
from collections import defaultdict

n = int(input())
D = defaultdict(lambda: 0)
for _ in range(n):
    a = int(input())
    D[a] ^= 1
print(sum(D.values()))

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

a = [] 

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


ans = 0
i = 0

while(i<n):
    chk = a[i]
    tmp = 1
    while(i+tmp < n and chk == a[i+tmp]):
        tmp += 1
    ans += (tmp)%2
    i += tmp
print(ans)

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

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

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

Solution (Python):


import sys

sys.setrecursionlimit(10**7)


def read_h(typ=int):
    return list(map(typ, input().split()))


def read_v(n, m=1, typ=int):
    return [read_h() if m > 1 else typ(input()) for _ in range(n)]


def main():
    N, = read_h()
    A = read_v(N)

    cnts = {}
    for a in A:
        cnts[a] = cnts.get(a, 0) + 1

    

    ans = 0
    for n in cnts.values():
        if n % 2 != 0:
            ans += 1

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
from collections import Counter
n=int(input())
l=[int(input()) for i in range(n)]
L=Counter(l)
print(sum(1 for i in L.values() if i%2==1))

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

Solution (Python):

N =int(input())
A = []
for i in range(N):
    A.append(int(input()))
A.sort()
for i in range(N-1):
    if A[i] == A[i+1]:
        A[i] = 0
        A[i+1] = 0
A = set(A)
if 0 in A:
    print(len(A) - 1)
else:
    print(len(A))

Solution (Python):
N = int(input())
A = [input() for i in range(N)]
A = list(map(int, A))
A.sort()
count = 0
ans = 0
i = 0
while i < N:
    target = A[i]
    j = i
    while j < N:
        if target == A[j]:
            count += 1
            i += 1
            j += 1
        else:
            break
    if count % 2 == 1:
        ans += 1
    count = 0
print(ans)

Solution (Python):

N = int(input())

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

list_A.sort()

ans = 0

num = 0

count = 0

for A in list_A:
    
    if A == num:
        
        count += 1
    
    else:
        
        if count % 2 != 0:
            
            ans += 1
        
        num = A
        count = 1        

if count % 2 != 0:
    ans += 1

print(ans)

Solution (Python):
import bisect

N = int(input())

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

paper = []

for A in list_A:
    if paper == []:
        paper.append(A)
        continue
    
    index = bisect.bisect_left(paper, A)
    if index < len(paper) and paper[index] == A:
        del paper[index]
    else:
        paper.insert(index, A)

print(len(paper))

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

Solution (Python):
N = int(input())
dic = {}
for _ in range(N):
    a = int(input())
    dic[a] = dic.get(a,0) + 1
g = 0
for c in dic.keys():
    if dic[c] % 2 == 1:g += 1
print(g)

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

Solution (Python):

n = int(input())
num_list = sorted([ int(input()) for i in range(n)])
num_list_2 = []

for i in range(n):
    if i == 0:
        num_list_2.append([num_list[i]])
    else:
        if num_list[i-1] == num_list[i]:
            num_list_2[-1].append(num_list[i])
        else:
            num_list_2.append([num_list[i]])



num_list_2 = [ len(i)%2 for i in num_list_2 ]
print(sum(num_list_2))

Solution (Python):
import collections

N = int(input())
W = [int(input()) for _ in range(N)]
c = collections.Counter(W)
print(len([i for i in c.values() if i % 2 != 0]))

Solution (Python):
n=int(input())
a=list(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==0:
            cnt=1
        else:
            ans+=1
            cnt=1
if a[-2]==a[-1]:
    if cnt%2==1:
        ans+=1
else:
    ans+=1
print(ans)

Solution (Python):
N = int(input())
alist = sorted([int(input()) for x in range(N)])

tmpNum = alist[0]
cnt = 1
ans = 0
for i in range(1, N):
	num = alist[i]
	if tmpNum == num:
		cnt = cnt + 1
		if i == N-1 and cnt % 2 != 0:
			ans = ans + 1
	else:
		if cnt % 2 != 0:
			ans = ans + 1
		tmpNum = num
		cnt = 1
		if i == N-1:
			ans = ans + 1

if len(alist) == 1:
	ans = ans + 1


print(ans)

Solution (Python):

N = int(input())
dic = {}

for i in range(N):

    A = input()

    if A in dic:
        dic[A] += 1
    else:
        dic[A] = 1

ans = 0

for i in dic:

    if dic[i] % 2 == 1:
        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 e in A:
    if A[e]%2==1:
        ans+=1
print(ans)

Solution (Python):
from collections import Counter

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

cnt = Counter(A)

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

print(ans)

Solution (Python):



from collections import Counter

N = int(input())
arr = [int(input()) for i in range(N)]
dic = Counter(arr)
ctr = 0

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

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

Solution (Python):
b=set()
n,*a=map(int,open(0).read().split())
for i in a:
    if i not in b:
        b.add(i)
    else:
        b.remove(i)
print(len(b))

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

dict={}
for i in range(n):
    if not a[i] in dict or dict[a[i]]==0:
        dict[a[i]]=1
    else:
        dict[a[i]]=0

ans=0
for i in dict.values():
    ans+=i
print(ans)

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

A.sort()
for i in range(N-1):
    if A[i] == A[i+1]:
        A[i] = 0
        A[i+1] = 0


for i in range(N):
    if A[i] > 0:
        A[i] = 1


print(sum(A))

Solution (Python):
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 (k, v) in C.items():
    if v % 2 == 1:
        ans += 1

print(ans)

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

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

print(len(a))

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

Solution (Python):
data=[int(input()) for i in range(int(input()))]
data.sort()
count=-1
value=1
predata=None
for i in range(0,len(data)):
    if predata!=data[i]:
        count+=value%2
        value=1
    else:
        value+=1
    predata=data[i]
count+=value%2
print(count)

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

from collections import defaultdict
d = defaultdict(int)

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

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

print(ans)

Solution (Python):
n = int(input())
a = []
d={}
for i in range(n):
    x = int(input())
    a.append(x)
for i in range(len(a)):
    d[a[i]]=0
for i in range(len(a)):
    d[a[i]]+=1
l = 0
for key in d:
    l+=(d[key]%2)
print(l)

Solution (Python):

import sys

input=sys.stdin.readline

n=int(input())

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

ans=0
for v in A.values():
    if v%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 i in range(n)]
A=Counter(a)

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

Solution (Python):
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

N = n()
As = []
memo = set()
for i in range(N):
    A = n()
    if A in memo:
        memo.remove(A)
    else:
        memo.add(A)

print(len(memo))

Solution (Python):

n = int(input())
hash = dict()
for _ in range(n):
    x = int(input())
    if x in hash:
        hash[x] += 1
    else:
        hash[x] = 1

ans = 0
for _, v in hash.items():
    if v % 2 == 1:
        ans += 1
print(ans)

Solution (Python):




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

for i in range(n):
    a = input()
    if adict.get(a) == None:
        adict[a] = 1
    else:
        adict[a] += 1

ans = 0
for k in adict.keys():
    if adict[k] % 2 == 1:
        ans += 1


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):
N = int(input())
l = []
for _ in range(N):
    l.append(int(input()))

import collections
cnt = 0
c = collections.Counter(l)
c = c.most_common()
print(len([i for i in c if i[1]%2 == 1]))

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

answer = {}
for i in range(n):
  ai = int(input())
  if answer.get(ai):
    answer.pop(ai)
  else:
    answer[ai] = 1
    
print(len(answer))

Solution (Python):
n = int(input())
a=[]
for i in range(n):
    a.append(int(input()))
a.sort()
cnt = 1
ans = 0
for i in range(n-1):
    if a[i]==a[i+1]:
        cnt += 1
    else:
        ans += cnt%2
        cnt = 1
ans += cnt%2
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):
n=int(input())
ansl=set([])
for i in range(n):
    a=int(input())
    if a in ansl:
        ansl.remove(a)
    else:
        ansl.add(a)
print(len(ansl))

Solution (Python):
n = int(input())
nums = [int(input()) for _ in range(n)]
dc = {}
for i in range(n):
  if not nums[i] in dc:
    dc[nums[i]] = 1
  else:
    del dc[nums[i]]

print(len(dc))

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

a.sort()
a.append(0)
erased = 0
ans = 0
for i in range(1,n+1):
    if a[i-1] == a[i]:
        erased = (erased+1)%2
    else:
        if erased == 0:
            ans += 1
        erased = 0
print(ans)

Solution (Python):
def main():
    N = int(input())
    A = [int(input()) for _ in range(N)]
    A.sort()
    t = A[0]
    ans = 1
    for i in range(1, N):
        t -= A[i]
        if t == 0:
            ans -= 1
        else:
            t = A[i]
            ans += 1
    print(ans)


main()

Solution (Python):
N = int(input())
j_dic = {}
for _ in range(N):
    A = int(input())
    j_dic[A] = (j_dic.get(A,0) + 1)%2

ans = 0
for key in j_dic:
    if j_dic[key] == 1:
        ans += 1
print(ans)

Solution (Python):
N = int(input())
ans = {}
for i in range(N):
  ai = int(input())
  if ans.get(ai):
    ans.pop(ai)
  else:
    ans[ai] = 1
print(len(ans))

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

A = []
for i in range(N):
    A.append(int(input()))
A.sort()
index = 0
n = 0
while index < N:
    s = A[index]
    count = 0
    while index < N and A[index] == s:
        count += 1
        index += 1
    n += count % 2
print(n)

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

for i in range(n):
    a = int(input())
    if a in num:
        num.remove(a)
        ans -= 1
    else:
        num.add(a)
        ans += 1
print(ans)

Solution (Python):
from collections import defaultdict

def main():
    num = int(input())
    count = defaultdict(int)
    for i in range(num):
        data = int(input())
        count[data] += 1

    ans = 0
    for i, v in count.items():
        if v % 2 == 1:
            ans += 1
    print(ans)



if __name__ == '__main__':
    main()

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

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

ans = [input() for i in range(n)]

ans.sort()

s = sorted(set(ans))
t = 0
cnt = 0

result = 0
for i in range(n):
    temp = s[t]
    if ans[i] == temp:
        cnt += 1
    else:
        if cnt % 2 == 1:
            result += 1
        cnt = 1
        t += 1
else:
    if cnt % 2 == 1:
        result += 1
        
    
    

print(result)