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):
def main():
    N = int(input())

    Ai_to_num = {}
    for _ in range(N):
        Ai = input()
        if Ai in Ai_to_num.keys():
            Ai_to_num[Ai] += 1
        else:
            Ai_to_num[Ai] = 1
    ct = 0
    for num_i in Ai_to_num.values():
        if num_i % 2:
            ct += 1
    
    print(ct)

main()

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

bit = {}
for i in range(n):
    a = int(input())
    if a not in bit:
        bit[a] = 1 
    else:
        if bit[a]:
            bit[a] = 0
        else:
            bit[a] = 1
print(sum(bit.values()))

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):
import sys
import collections
ns = lambda: sys.stdin.readline().rstrip()
ni = lambda: int(ns())
nm = lambda: map(int, sys.stdin.readline().split())
nl = lambda: list(nm())

n = ni()

a = [ni() for _ in range(n)]
c = collections.Counter(a).values()
ans = 0
for t in c:
    if t % 2 != 0:
        ans += 1
print(ans)

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

paper = defaultdict(int)
for i in range(N):
    A = int(input())
    paper[A] += 1

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

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

Solution (Python):


import itertools
import collections
import bisect

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

    ans = 0
    for pair in c.items():
        if pair[1] % 2 == 1:
            ans += 1
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
d = dict()
for i in range(n):
    x = int(input())
    if d.__contains__(x):
        d[x]+=1
    else:
        d[x]=1

res = 0

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

print(res)

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

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

a=Counter(A)
count=0

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

print(count)

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

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

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

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

Solution (Python):
n=int(input())
ans=0
l=[int(input()) for i in range(n)]
from collections import Counter
lst=list(Counter(l).values())
def mod2(n):
  if n%2==1:
    return 1
  else:
    return 0
ans=0
for i in lst:
  ans+=mod2(i)
print(ans)

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

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

Solution (Python):
from collections import Counter

n = int(input())
inputs = [int(input()) for _ in range(n)]
counter = Counter(inputs)

answer = 0
for number, count in counter.items():
    if count % 2 != 0:
        answer += 1

print(answer)

Solution (Python):
import collections

d = collections.defaultdict(int)

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

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

print(ans)

Solution (Python):
n=int(input())
a=[int(input()) for _ in range(n)]
import collections
unique=set(a)
c=collections.Counter(a)
ans=0
for x in unique:
    if c[x]%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.remove(a)
    else:
        s.add(a)
print(len(s))

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

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

print(len(A))

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

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

dic = {}

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

cnt = 0

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

print(cnt)

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

paper = {}
for n in t:
    if n in paper:
        del paper[n]
    else:
        paper[n] = 1
                
print(len(paper.keys()))

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

A.sort()

i = 0

ans = 0

while i != len(A):
	num = A[i]
	count = 0
	j = i
	while A[j] == num:
		count += 1
		j += 1
		if j == len(A):
			break

	if count % 2 == 1:
		ans += 1
	i += count
	
print(ans)

Solution (Python):
from itertools import groupby

N = int(input())

A = [None] * N

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

A = sorted(A)
B = [len([x for x in group]) for k, group in groupby(A)]
B = [b % 2 for b in B]
print(sum(B))

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

Solution (Python):
import numpy as np
N = int(input())
ansd = {}
for i in range(N):
    a = int(input())
    if a not in ansd.keys():
        ansd[a] = 1
    else:
        ansd[a] += 1
answers = np.array(list(ansd.values()))
print(sum(answers % 2 == 1))

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

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

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

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

memo=dict()
for a in A:
  memo[a] = not memo.get(a,False)
  
print(sum(memo.values()))

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

memo=dict()
for a in A:
  memo[a] = not memo.get(a,False)
  
print(sum(memo.values()))

Solution (Python):
import sys
n=int(input())
a=[int(i) for i in sys.stdin]
a.sort()
stack=a[0]
num=1
ans=0
for i in range(1,n):
  if a[i]==stack:
    num+=1
  else:
    if num%2==1:
      ans+=1
    stack=a[i]
    num=1
if num%2==1:
  ans+=1
print(ans)

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

cc = collections.Counter(A)
count = 0
for c in cc.items():
    if c[1] % 2 == 1:
        count += 1
print(count)

Solution (Python):


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

def arraycount(arr):
    arr_target = [[]]
    cnt = 1
    for i in range(1,len(arr)):
        if arr[i] == arr[i-1]:
            cnt += 1
        else:
            arr_target.append([arr[i-1],cnt])
            cnt = 1
    arr_target.append([arr[len(arr)-1],cnt])
    del arr_target[0]
    return arr_target

a.sort()
a = arraycount(a)
ans = 0

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

print(ans)

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

Solution (Python):
import collections

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

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

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

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

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

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

for i in range(N):
  count += 1
  if i == N-1:
    if count%2 == 1:
      ans += 1

    


    
  elif A[i] != A[i+1]:
    if count % 2 == 1:
      ans += 1

    count = 0

print(ans)

Solution (Python):
import sys
from collections import defaultdict

def main():
    input = sys.stdin.readline
    N = int(input())
    d = defaultdict(lambda: 0)
    for _ in range(N):
        a = int(input())
        d[a] += 1

    ans = 0
    for key in d:
        if d[key] % 2 == 1:
            ans += 1

    return ans


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

Solution (Python):
n = int(input())
s = [int(input()) for _ in range(n)]
s = sorted(s)
i = s[0]
cnt = 1
num = 0
for j in s[1:]:
    if i == j:
        cnt += 1
    else:
        if cnt % 2 != 0:
            num += 1
        cnt = 1
    i = j
if cnt % 2 != 0:
    num += 1
print(num)

Solution (Python):
N=int(input())
from collections import defaultdict
d=defaultdict(int)
for i in range(N):
    d[int(input())]+=1
cnt=0
for a in d.keys():
    if d[a]%2==1:
        cnt+=1
print(cnt)

Solution (Python):
n = int(input())
a = sorted([int(input()) for _ in range(n)])
tmp = a[0]
cnt = [0]*n
ptr = 0
for i in range(n) :
  if(a[i-1] != a[i]) :
    ptr += 1
  cnt[ptr] += 1
print(sum([cnt[i]%2 for i in range(len(cnt))]))

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

lis.sort()

count=0
while len(lis)>1:
    if lis[0]==lis[1]:
        del lis[:2]
    else:
        del lis[0]
        count+=1
print(count+len(lis))

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

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


print(ans)

Solution (Python):
from collections import Counter
from sys import stdin

lines = stdin.readlines

N, *A = map(int, lines())
An = Counter(A)


def main():
    print(sum([1 for v in An.values() if v % 2]))
    return


main()

Solution (Python):
from collections import Counter
from sys import stdin

lines = stdin.readlines
N, *A = [int(line) for line in lines()]

An = Counter(A)


def main():
    print(sum([1 for k, v in An.items() if v % 2]))
    return


main()

Solution (Python):
from collections import Counter

n=int(input())

mylist=[input() for aa in range(n)]


data=Counter(mylist)
val=list(data.values())
val=[1 for aa in val if aa%2==1]
print(sum(val))

Solution (Python):
import collections
N=int(input())
history=[]
for i in range(N):
  history.append(int(input()))
history=sorted(history)
nums=list(collections.Counter(history).values())
print(sum([n%2 for n in nums]))

Solution (Python):
N=int(input())
history=[]
for i in range(N):
  history.append(int(input()))
history=sorted(history)
nums=[]
for i in range(N):
  if i==0:
    nums.append(1)
  else:
    if history[i]==history[i-1]:
      nums[-1]+=1
    else:
      nums.append(1)
print(sum([n%2 for n in nums]))

Solution (Python):
from collections import Counter
n=int(input())
a=[]
for i in range(n):
    a.append(int(input()))
index,cnt=zip(*Counter(a).most_common())
ans=0
for i in range(len(index)):
    if cnt[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=sum([1 if i%2==1 else 0 for i in A.values()])
print(ans)

Solution (Python):
def write_and_erase(N: int, A: list)->int:
    d = {}
    for a in A:
        d.setdefault(a, 0)
        d[a] = (d[a] + 1) % 2

    return sum(v for v in d.values())


if __name__ == "__main__":
    N = int(input())
    A = [int(input()) for _ in range(N)]
    ans = write_and_erase(N, A)
    print(ans)

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

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

for i in range(N):
    if i == 0:
        tmpnum = S[i]
        tmpcnt = 1
    else:
        if S[i] == tmpnum:
            tmpcnt += 1
        else:
            if tmpcnt % 2 != 0:
                cnt += 1
            tmpnum = S[i]
            tmpcnt = 1

if tmpcnt % 2 != 0:
    cnt += 1
            
print(cnt)

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

x=collections.Counter(A)
cnt=0
for v in x.values():
    if v%2==1:
        cnt+=1

print(cnt)

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

Solution (Python):

n = int(input())
dic = {}
for _ in range(n):
    x = int(input())
    if x in dic:
        del dic[x]
    else:
        dic[x] = 1

print(len(dic))

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

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

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

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

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

Solution (Python):
N = int(input())
d = {}
for _ in range(N):
    key = int(input())
    if key in d:
        d[key] += 1
    else:
        d[key] = 1
count = 0
for key in d:
    count += d[key] % 2
print(count)

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

for i in range(n):
    if a[i] == pre:
        count+=1
    else:
        pre = a[i]
        if count%2 == 1:
            ans += 1
        count = 1
if count%2 == 1:
    ans += 1
print(ans)

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

Solution (Python):
import collections
N = int(input())
As = [int(input()) for i in range(N)]
Acounter = collections.Counter(As)
ans = 0
for a,acount in Acounter.items():
    if acount%2!=0:
        ans+=1
print(ans)

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

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007


def A():
    return


def B():
    return


def C():
    n = II()
    A = {}
    for i in range(n):
        k = II()
        if not k in A:
            A[k] = 1
        else:
            A[k] += 1
    ans = 0
    
    for item in A.values():
        ans += item % 2
    print(ans)
    return


def D():
    return


def E():
    return


def F():
    return


def G():
    return


def H():
    return


if __name__ == '__main__':
    C()

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007


def A():
    n = I()
    print(n*800-200*(n//15))


def B():
    k = I()
    ans = 0
    for i in range(1,k):
        for j in range(i+1,k+1):
            if (i%2)^(j%2):
                ans += 1
    print(ans)


def C():
    x,t = LI()
    print(max(0,x-t))


def D():
    n = I()
    ans = 1
    for i in range(1,n+1):
        ans *= i
        ans %= mod
    print(ans)


def E():
    x,y,s,t = LI()
    return


def F():
    n = I()
    x = LI()
    a = sorted(x)
    for i in range(n):
        j = bisect.bisect_left(a,x[i])
        if j >= n//2:
            print(a[n//2-1])
        else:
            print(a[n//2])


def G():
    n,m = LI()
    if m <= 2*n:print(m//2)
    else:
        ans = n
        m -= 2*n
        ans += m//4
        print(ans)


def H():
    n,k = LI()
    ans = 0
    fact
    for i in range(1,3*n+1):
        if i%k == 0:
            return

def J():
    n = I()
    d = defaultdict(int)
    for i in range(n):
        a = I()
        if d[a]:
            d[a] -= 1
        else:
            d[a] += 1
    print(sum(d.values()))
def K():
    return


if __name__ == "__main__":
    J()

Solution (Python):
N = eval(input())
num = []
flag = {}
for i in range(N):
    num.append(eval(input()))
for i in num:
    if i not in flag.keys():
        flag[i] = False
    else:
        flag[i] = not flag[i]
sum = 0
for i in flag.keys():
    if not flag[i]:
        sum = sum + 1
print(sum)

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

Solution (Python):
from collections import Counter

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

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

c = collections.Counter(a)
c_odd = list(filter(lambda x:x%2==1,c.values()))

print(len(c_odd))

Solution (Python):
from collections import Counter

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

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

print(res)

Solution (Python):
from collections import Counter

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

A = Counter(A)
num = []
for a in A.items():
    if a[1]%2 != 0:
        num.append(a[0])

print(len(set(num)))

Solution (Python):
import collections
import itertools
import numpy as np
import sys
MAX_INT = int(10e10)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()
l = [I() for i in range(N)]
l.sort()


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

    print(ans)

Solution (Python):
from collections import Counter

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

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

Solution (Python):
from collections import defaultdict
N = int(input())
dic, ans = defaultdict(int), 0
for _ in range(N):
    dic[int(input())] += 1
for key in dic:
    if dic[key] % 2:
        ans += 1
print(ans)

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


if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
Alist = [int(input()) for i in range(N)]
Alist.sort()
Alist.append('END')
counter = 1
ans = 0

for i in range(1, len(Alist)):
    if Alist[i - 1] == Alist[i]:
        counter += 1
    else:
        if counter % 2 == 1:
            ans += 1
        counter = 1

print(ans)

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007






n = I()
d = defaultdict(int)
for i in range(n):
    a = I()
    d[a] ^= 1
d = list(d.values())
print(sum(d))

Solution (Python):
import collections

n = int(input())

co = collections.Counter([int(input()) for i in range(n)])

c =0

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

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

d = {}
for i in a:
    if i not in d:
        d[i] = True
    else:
        if d[i] == True:
            d[i] = False
        else:
            d[i] = True
cnt = 0
for i in d:
    if d[i] == True:
        cnt += 1
print (cnt)

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

tmp = {a: 0 for a in set(A)}

for a in A:
    tmp[a] += 1
cnt = 0
for x in tmp.values():
    if x & 1 == 1:
        cnt += 1
print(cnt)

Solution (Python):
import collections

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

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

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

Solution (Python):
n = int(input())
a = [int(input()) for i in range(n)]
a.sort()
now = a[0]
num = 1
b = []
for i in a[1:]:
  if i == now:
    num += 1
  else:
    b.append(num)
    num = 1
  now = i
b.append(num)
c = [i % 2 for i in b]
print(sum(c))

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

def solve(a):
    c = dict()
    for i in a:
        c[i] = c.get(i, 0) + 1
    
    return count(i for i in c.values() if i % 2 != 0)

def count(it):
    c = 0
    for _ in it:
        c += 1
    return c

main()

Solution (Python):
import collections

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

c = collections.Counter(A).most_common()

ans = 0
for i,j in c:
    if j % 2 != 0: ans += 1

print( ans )

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

Solution (Python):
from collections import Counter
N=int(input())
r=[]
while N>0:
    N-=1
    r.append(int(input()))
a=Counter(r)
count=0
for i in a:
    count+= a[i]%2
print(count)

Solution (Python):
import sys
input = sys.stdin.readline
n = int(input())
a = [int(input()) for i in range(n)]

a.sort()

res = 0
c = 1
for i in range(1,n):
    if a[i] == a[i-1]:
        c += 1
        continue
    res += c%2
    c = 1
res += c%2
print(res)

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

Solution (Python):
import collections

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

Solution (Python):
from collections import Counter

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

c=Counter(l)
d=c.most_common()
x=len(d)
sum=0
for i in range(x):
    sum+=d[i][1]%2
print(sum)

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

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

Solution (Python):

"""
Created on Tue Mar  5 22:41:58 2019

@author: yuta
"""
from collections import Counter
N = int(input())
A = [list(map(int,input().split())) for _ in range(N)]

def main(n,a):
    b = []
    for j in range(n):
        b.append(a[j][0])
        
    count = 0
    c = Counter(b)
    b_new = list(set(b))
    for i in range(len(c)):
        if c[b_new[i]] % 2 != 0:
            count += 1
    print(count)
main(N,A)

Solution (Python):

N=int(input())
A=[]
for n in range(N):
	A.append(int(input()))
A.sort()
x=A[0]
i=1
ans=N
while i<N:
	if A[i]==x:
		ans-=2
		i+=1
		if i<N:
			x=A[i]
		i+=1
	else:
		x=A[i]
		i+=1
print(ans)

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

count = 0
for d in D.values():
    count += d%2

print(count)

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

Solution (Python):
from collections import Counter

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

res = 0

c = Counter(A)

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

print(res)

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

A.sort()
A.append(0)
Ans = []
keepcount = 0
count = 0
for i in A:
    if keepcount == 0:
        count = 1
        keepcount = i
    elif keepcount == i:
        count += 1
        keepcount = i
    else:
        keepcount = i
        Ans.append(count)
        count = 1


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

print(ans)

Solution (Python):
q=[]
n=int(input())
l=[]
for i in range(n):
  l.append(int(input()))
l.sort()
for a in l:
  if len(q)==0:
    q.append(a)
  else:
    b=q.pop()
    if a==b:
      pass
    else:
      q.append(b)
      q.append(a)
print(len(q))

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

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

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

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

ans=sum(m.values())

print(ans)

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

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

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

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

Solution (Python):
N = int(input())
import collections as coll
L = [input() for _ in range(N)]

c = list(filter(lambda x:x[1]%2==1,(list(coll.Counter(L).items()))))
print(len(c))