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 = [int(input()) for _ in range(n)]
a.sort()
d = [1]
for i in range(n-1):
    if a[i] != a[i+1]:
        d.append(1)
    else:
        d[-1] += 1
ans = 0
for i in d:
    ans += i%2
print(ans)

Solution (Python):
N = int(input())
A = {}

for i in range(N):
    a = int(input())
    if a in A:
        A[a] ^= 1
    else:
        A[a] = 1

print(sum(A.values()))

Solution (Python):
from collections import defaultdict

N = int(input())
dict = defaultdict(int)
ans = 0

for i in range(N):
    dict[input()] += 1

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

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

dic = {}

for i in range(n):
    a = int(input())
    if dic.get(a) is None:
        dic[a] = 1
    else:
        dic[a] = (dic[a] + 1)%2
        
    
val = list(dic.values())
ans = int(sum(val))

print(ans)

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

import collections
C = collections.Counter(A)
ans = 0
for a in C.values():
    if a % 2 == 1:
        ans += 1

print(ans)

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

c = Counter(a_ls)
ans = 0
for value, count in c.items():
    if count % 2 == 1:
        ans += 1

print(ans)

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

l_set=list(set(l))
counter=collections.Counter(l)
ans=0
for i in range(len(l_set)):
    if counter[l_set[i]]%2!=0:
        ans+=1
print(ans)

Solution (Python):
n = int(input())
a = []
for i in range(n):
    s = int(input())
    a.append(s)
a.sort()
i = 0
cnt = 0
while i < n:
    j = i+1
    chk = 1
    if j >= n:
        cnt += 1 
        break
    while a[i] == a[j]:
        chk += 1
        j += 1
        if j >= n:
            break
    if chk%2 == 1:
        cnt += 1 
    i = j
print(cnt)

Solution (Python):
n = int(input())
l = [0] * 100010

mp = {}
for i in range(n):
    a = int(input())
    if a in mp:
        del mp[a]
    else:
        mp[a] = 1
print(len(mp))

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

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

    c = collections.Counter(a)

    num = list(c.values())
    ans = 0
    for i in range(len(num)):
        if num[i]%2 == 1:
            ans += 1

    return ans

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

Solution (Python):
import collections

def main():
    N = int(input())
    S = []
    for _ in range(N):
        S.append(input())
    c = collections.Counter(S)
    count = 0
    for t in c.most_common():
        if t[1] % 2 != 0:
            count = count + 1
    print(count) 

if __name__ == "__main__":
    main()

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

Solution (Python):
n = int(input())
s = set([])
for i in range(n):
    a = int(input())
    if a in s:
        s -= {a}
    else:
        s |= {a}
print(len(s))

Solution (Python):
N = int(input())
A = [input() for _ in range(N)]
import collections
C = collections.Counter(A)
count = 0
for a in C.values():
    if a % 2 == 1:
        count += 1

print(count)

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

Solution (Python):


from collections import deque,Counter






import numpy as np






N = int(input())
rows = [int(input()) for _ in range(N)]
cnt = Counter(rows)
ans = 0
for k,v in cnt.items():
    if v%2 == 1:
        ans += 1
        
print(ans)

Solution (Python):
import collections
import sys
sys.setrecursionlimit(2000000)




n = int(input())

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

ans = collections.Counter(a)

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

print(count)

Solution (Python):
N = int(input())
list = set()
for i in range(N):
    i = int(input())
    if i not in list:
        list.add(i)
    elif i in list:
        list.remove(i)
print(len(list))

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

Solution (Python):
from sys import stdin
import sys
import math

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

h = {}

for i in A:
    h[i] = 0

for j in A:
    h[j] += 1


count = 0
for val in h.values():
    if val % 2 == 1:
        count += 1

print(count)

Solution (Python):
from sys import stdin
import sys
import math

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

h = {}

for i in A:
    h[i] = 0

for j in A:
    h[j] += 1


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

print(count)

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

for key in a:
    d[key]+=1

for k,v in d.items():
    if v%2==1:
        D.append(k)
print(len(D))

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

def myAnswer(N:int,dic:dict) -> int:
   ans = 0
   for a in dic.values():
      if(a % 2 == 1):
         ans += 1
   return ans

def modelAnswer():
   return
def main():
   N = int(input())
   dic = {}
   for _ in range(N):
      a = int(input())
      if(a in dic.keys()):
         dic[a]+=1
      else:
         dic[a]=1
   print(myAnswer(N,dic))
if __name__ == '__main__':
   main()

Solution (Python):
def myAnswer(N:int,dic:dict) -> int:
   ans = 0
   for a in dic.values():
      if(a % 2 == 1):
         ans += 1
   return ans

def modelAnswer():
   return
def main():
   N = int(input())
   dic = {}
   for _ in range(N):
      a = int(input())
      if(a in dic.keys()):
         dic[a]+=1
      else:
         dic[a]=1
   print(myAnswer(N,dic))
if __name__ == '__main__':
   main()

Solution (Python):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))
n = ii()
s = set()
for i in range(n):
    num = ii()
    if num in s:
        s.remove(num)
    else:
        s.add(num)

print(len(s))

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

ans = 0
for value in key.values():
  ans += value
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)
ans = 0
for v in c.values():
    if v % 2 == 1:
        ans += 1
print(ans)

Solution (Python):
def resolve():
    N = int(input())
    A = [int(input()) for i in range(N)]
    d = {}
    for a in A:
        if not a in d:
            d[a] = 1
        else:
            d[a] += 1
    res = 0
    for v in d.values():
        if v % 2 != 0:
            res += 1
    print(res)

if '__main__' == __name__:
    resolve()

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

def main():
    N = int(readline())
    A = [int(readline()) for _ in range(N)]
    c = Counter(A)
    ans = 0
    for _, v in zip(c.keys(), c.values()):
        if v % 2 == 1:
            ans += 1
    
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):

n = int(input())
nums = []
for _ in range(n):
    nums.append(int(input()))

s = set()
for num in nums:
    if num in s:
        s.remove(num)
    else:
        s.add(num)
ans = len(s)
print(ans)

Solution (Python):
def ABC073C(d,i):
    if i in d:
        d[i]= not(d[i])
    else:
        d[i]=True
    return d

n,*a=map(int,open(0).read().split())
d=dict()
for i in a:
    d = ABC073C(d,i)
print(sum(d.values()))

Solution (Python):
def ABC073C(d,i):
    if i in d:
        d[i]= not(d[i])
    else:
        d[i]=True
    return d

n=int(input())
d=dict()
for i in range(n):
    d = ABC073C(d,int(input()))
print(sum(d.values()))

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

pre = sorted_A[0]
ans = 0
if len(sorted_A) == 1:
    print(1)
else:
    count = 1
    for i in range(1, len(sorted_A)):
        if sorted_A[i] == pre:
            count += 1
            if i == len(sorted_A)-1:
                if count % 2 == 1:
                    ans += 1
        else:
            if i == len(sorted_A)-1:
                ans += 1
            if count % 2 == 1:
                ans += 1
            pre = sorted_A[i]
            count = 1
    print(ans)

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

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

Solution (Python):
import collections
import sys
import numpy as np
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
MOD = 10**9+7
import itertools
import math
import functools

n = int(input())
a = [int(input()) for i in range(n)]
c = collections.Counter(a)
ans = []
for key,value in c.items():
    ans.append([key,value])
cnt = 0
for i in range(len(ans)):
    if ans[i][1]%2 == 1:
        cnt += 1
print(cnt)

Solution (Python):
import collections

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

Adic = collections.Counter(A)

B = [n % 2 for n in Adic.values() if n % 2 != 0]

print(len(B))

Solution (Python):
import collections

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

Adic = collections.Counter(A)

B = [n % 2 for n in Adic.values()]

print(B.count(1))

Solution (Python):
from collections import defaultdict

n = int(input())
data = defaultdict(int)

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

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

print(ans)

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

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

Solution (Python):
N = int(input())
d = {}
a = []
for _ in range(N):
    A = int(input())
    a.append(A)
    if not(A in d):
        d[A] = 1
        continue
    elif d[A]==1:
        d[A] = 0
    else:
        d[A] = 1

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

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

from collections import Counter


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

COUNTS = Counter(A)

print(sum(count % 2 for count in COUNTS.values()))

Solution (Python):

import io

data = int(input())

array = set()
for _ in range(data):
    ai = int(input())
    if ai in array:
        array.remove(ai)
    else:
        array.add(ai)
print(len(array))

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

dic=dict(Counter(a))
ans=0
for i,k in dic.items():
    if k%2==1:
        ans+=1
print(ans)

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
















N = int(input())
d = {}
s = 0
for i in range(N):
    a = int(input())
    if a in d.keys():
        d[a] += 1
    else:
        d[a] = 1
for i in d.values():
    s += i%2
print(s)

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

S=Counter(L)
count=0
for i,j in S.items():
	if j%2==1:
		count+=1
print(count)

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

import collections

tc = collections.Counter(t)
tci = list(tc.items())

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

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

d = {}
ans = 0

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

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

print(ans)

Solution (Python):
import sys
import os
import math

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

MOD = 10 ** 9 + 7


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

    N = ii()
    ret = set()
    for n in range(N):
        i = [ii()]
        ret ^= set(i)
    print(len(ret))


if __name__ == '__main__':
    main()

Solution (Python):
n=int(input());A=[]
for i in range(n):
    A.append(int(input()))
A.sort()
i = 1
count = 0
odd = 1
value = A[0]
while i < n:
    if value != A[i]:
        count += odd%2
        odd = 1
        value = A[i]
    else:
        odd += 1
    i += 1
count+= odd%2
print(count)

Solution (Python):
n = int(input())
a = [int(input()) for _ in range(n)]
count = {}
for i in a:
    if i in count.keys() and count[i]==1:
        count[i] -= 1
    else:
        count[i] = 1
print(sum(count.values()))

Solution (Python):
import collections

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

c = collections.Counter(a)

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

print(ans)

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

Solution (Python):
from collections import Counter

N,*An=map(int, open(0).read().split())

count=Counter(An)
print(len(list(filter(lambda v:v%2==1, count.values()))))

Solution (Python):
from collections import defaultdict

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

print(len(list(filter(lambda v:v%2==1, An.values()))))

Solution (Python):
n = int(input())
a = sorted([int(input()) for _ in range(n)])
l = 0
r = 0
c = 0
for i in range(1, n):
    if a[l] != a[i]:
        r = i - 1
        if (r - l + 1) & 1:
            c += 1
        l = i
r = n - 1
if (r - l + 1) & 1:
    c += 1
print(c)

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

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

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

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

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

A.sort()

current_number = A[0]
current_count = 1
ans = 0

for i in range(1,N-1):
    if current_number == A[i]:
        current_count += 1
    else:
        current_number = A[i]
        if current_count % 2 != 0:
            ans += 1
        current_count = 1

if current_number == A[N-1]:
    current_count += 1
    if current_count % 2 != 0:
            ans += 1
else:
    if current_count % 2 != 0:
            ans += 1
    ans += 1
print(ans)

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

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

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

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

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

print(len(paper))

Solution (Python):
n = int(input())
a = [int(input())for i in range(n)]
cnt = {}
for x in a:
    cnt[x] = 0
for x in a:
    if cnt[x] == 0:cnt[x]+=1
    else:cnt[x] -=1
ans = 0
for key in cnt:
    ans += cnt[key] >0
print(ans)

Solution (Python):
import collections

N = int(input())

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

A.sort()
cnt = collections.Counter(A)

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

print(ans)

Solution (Python):
import sys
from collections import Counter

n, *a = map(int, sys.stdin.read().split())

def main():
    res = 0
    for v in Counter(a).values():
        res += v & 1
    print(res)

if __name__ ==  '__main__':
    main()

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

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):
  a=int(input())
  if a in s:
    s.remove(a)
  else:
    s.add(a)
print(len(s))

Solution (Python):

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

count_list = [1]*len(set(a))
j = 0

for i in range(len(a)-1):
	if a[i] == a[i+1]:
		count_list[j] += 1
	else:
		j += 1

print(sum([ i%2 == 1  for i in count_list]))

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

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

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

Solution (Python):
import sys

def main():
    N = int(input())
    d = {}
    for _ in range(N):
        a = int(input())
        if a not in d:
            d[a] = 1
        else:
            if d[a] == 1:
                d[a] = 0
            else:
                d[a] = 1
    
    cnt = 0
    for v in d.values():
        if v == 1:
            cnt += 1
    print(cnt)
    
if __name__ == '__main__':
    main()

Solution (Python):










"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""

""" n! mod m 階乗
mod = 1e9 + 7
N = 10000000
fac = [0] * N
def ini():
  fac[0] = 1 % mod
  for i in range(1,N):
    fac[i] = fac[i-1] * i % mod"""

"""mod = 1e9+7
N = 10000000
pw = [0] * N
def ini(c):
  pw[0] = 1 % mod
  for i in range(1,N):
    pw[i] = pw[i-1] * c % mod"""

"""
def YEILD():
  yield 'one'
  yield 'two'
  yield 'three'
generator = YEILD()
print(next(generator))
print(next(generator))
print(next(generator))
"""
"""def gcd_(a,b):
  if b == 0:
    return a
  return gcd_(a,a % b) 
"""def extgcd(a,b,x,y):
  d = a
  if b!=0:
    d = extgcd(b,a%b,y,x)
    y -= (a//b) * x
    print(x,y)
  else:
    x = 1
    y = 0
  return d"""

"""def gcd(a,b):
  if b == 0:
    return a
  return gcd(b, a % b)
def lcm(a,b):
  g = gcd(a,b)
  return (a * b) // g"""

def readInts():
  return list(map(int,input().split()))
mod = 10**9 + 7

def main():
  n = int(input())
  dic = {}
  for i in range(n):
    a = int(input())
    if a in dic:
      if dic[a] == 1:
        dic[a] = 0
      elif dic[a] == 0:
        dic[a] = 1
    else:
      dic[a] = 1
  cnt = 0
  for k,v in dic.items():
    cnt += v
  print(cnt)
if __name__ == '__main__':
  main()

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

ans = 0
for kk in d.keys():
    if d[kk] == 1:
        ans += 1
print(ans)

Solution (Python):

url = "https://atcoder.jp//contests/abc073/tasks/abc073_c"

def main():
    li = {}
    n = int(input())
    for i in range(n):
        ind = int(input())
        li.setdefault(ind, 0)
        if li[ind] == 0:
            li[ind] = 1
        else:
            li[ind] = 0
    print(list(li.values()).count(1))


if __name__ == '__main__':
    main()

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

Solution (Python):
from collections import Counter
n, *A = map(int, open(0).read().split())
ans = 0
for v in  Counter(A).values():
  if v % 2 == 1:
    ans += 1
print(ans)

Solution (Python):
N = int(input())
num_dic = {}
cnt = 0
for i in range(N):
    A = int(input())
    if A in num_dic:
        del num_dic[A]
        cnt -= 1
    else:
        num_dic[A] = 1
        cnt += 1
print(cnt)

Solution (Python):

from collections import Counter
N = int(input())

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

answer = 0
C = Counter(A)
C_taple = C.most_common()

for i in C_taple:
    if i[1]%2!=0:
        answer += 1

print(answer)

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

aa = collections.Counter(a)
ans = 0
for i in aa:
    if aa[i] % 2 == 1:
        ans += 1
    
print(ans)

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

from collections import defaultdict
d=defaultdict(int)
for a in A:
    d[a]+=1
ans=0
for k in d.keys():
    if d[k]%2==1:
        ans+=1
print(ans)

Solution (Python):
n,*a=map(int,open(0).read().split())
s=set()
for i in a:
  s^={i}
print(len(s))

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

Solution (Python):
n = int(input())
d = {}
for i in range(n):
  a = int(input())
  if a in d:
    if d[a] <= 0:
      d[a] += 1
    else:
      d[a] -=1
  else:
    d[a] = 1
cnt = 0
for i in d.values():
  if i > 0:
    cnt += 1
print(cnt)

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

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

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

Solution (Python):


from collections import Counter


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


a_counter = Counter(a_list)
ans_count = 0


for count_key in a_counter:
    if a_counter[count_key]%2==1:
        ans_count += 1


print(ans_count)

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

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

ans = {}
for _ in range(N):
    a = input()
    if a in ans:
        del ans[a]
    else:
        ans[a] = 1

print(len(ans))

Solution (Python):
from collections import Counter

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

print(len([i for i in c if i % 2 == 1]))

Solution (Python):
import collections
co = collections.Counter()
n = int(input())
for i in range(n):
    a = int(input())
    if co[a] ==1:
        co[a]-=1
    else:co[a] +=1
ans = 0
for num,cnt in co.items():
    ans +=cnt
print(ans)

Solution (Python):
from collections import Counter, deque 












import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    N=int(input())
    A=[int(input()) for i in range(N)]
    AA=Counter(A)

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



resolve()

Solution (Python):
from collections import defaultdict

n = int(input())
d = defaultdict(int)

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

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

print(ans)

Solution (Python):
from collections import Counter

n = int(input())
A = list(int(input()) for _ in range(n))
D = Counter(A)

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

Solution (Python):
import sys
def main():
    input = sys.stdin.readline
    N=int(input())
    A=[int(input()) for _ in range(N)]
    from collections import Counter
    C=Counter(A)
    ans=0
    for v in C.values():
        if v&1: ans+=1
    print(ans)


if __name__ == '__main__':
    main()

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

cnt = {}
for Ai in A:
    key = str(Ai)
    cnt[key] = cnt.setdefault(key, 0) + 1

ans = sum([cnt[key] % 2 for key in cnt.keys()])
print(ans)

Solution (Python):
from collections import Counter
import sys
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 7)

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

ans = sum(v % 2 for v in c.values())
print(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 main():
    N = int(input())
    A = [int(input()) for i in range(N)]
    from collections import Counter
    c = Counter(A)
    ans = 0
    for v in c.values():
        if v % 2:
            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)]
c = Counter(l)
cnt = 0
for i in c.values():
    cnt+=i%2

print(cnt)

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin, log, log10
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
def debug(*args):
    if debugmode:
        print(*args)
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def FLOAT(): return float(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7
dx = [0, 0, 1, -1, 1, -1, -1, 1]
dy = [1, -1, 0, 0, 1, -1, 1, -1]
debugmode = False

n = INT()
arr = []
for i in range(n):
    arr.append(INT())
b = Counter(arr)
c = list(set(arr))
ans = []
for i in c:
    if b[i] % 2:
        ans.append(i)
print(len(ans))

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

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

for a in A:
    if a in st:
        st.remove(a)
    else:
        st.add(a)
print(len(st))

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

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

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

Solution (Python):
s = set()
for i in range(int(input())):
    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 i in range(n)]
ac = Counter(a)
ans = 0
for v in ac.values():
    if v%2 & 1:
        ans += 1
print(ans)

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

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

d = {}
for ai in a:
  if ai in d:
    d[ai] += 1
  else:
    d[ai] = 1
ans = 0
for v in d.values():
  if v%2 == 1:
    ans += 1
print(ans)

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

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

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

A.sort()

odd = 0
count = 1
a = A[0]
for i in A[1:]:
  if i == a:
    count += 1
  else:
    a = i
    if count % 2 == 1:
      odd += 1
    count = 1
if count % 2 == 1:
      odd += 1
print(odd)

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

A = {}

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

print(len(A))

Solution (Python):
from collections import Counter
n = int(input())
s = [0]*n
for i in range(n):
  s[i] = input()
dum = Counter(s)
s_most = dum.most_common()
s_len = len(s_most)
ans = 0
for i in range(s_len):
  if s_most[i][1]%2 != 0:
    ans += 1
print(ans)

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

Solution (Python):
def main():
    from collections import Counter
    import sys

    input = sys.stdin.readline

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

    ans = 0
    for cnt in ctr.values():
        ans += cnt % 2
    print(ans)


if __name__ == '__main__':
    main()

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

Solution (Python):
def main():
  import collections
  import sys
  input = sys.stdin.readline
  n = int(input())
  b = []
  for i in range(n):
    a = int(input())
    b_append = b.append
    b_append(a)

  s = set(b)
  s = tuple(s)
  c = collections.Counter(b)
  ans = 0
  for i in range(len(s)):
    if c[s[i]] % 2 == 0:
      continue
    else:
      ans += 1
  print(ans)
if __name__ == '__main__':
    main()