CodeEff/ECCO huggingface dataset:
# Original solution
from collections import defaultdict


s = input()[::-1]
cntr = defaultdict(int)
cntr[0] += 1
tens = 1
n = 0
for c in s:
    n += tens * int(c) % 2019
    n %= 2019
    cntr[n] += 1
    tens = tens * 10 % 2019

ans = 0
for v in list(cntr.values()):
    if v > 1:
        ans += v * (v - 1) // 2
print(ans)


# Optimized solution
s = input()[::-1]
cnt = [0] * 2020
cnt[0] = 1
tens = 1
rem = 0
ans = 0
for c in s:
    rem = (rem + (ord(c) - ord('0')) * tens) % 2019
    ans += cnt[rem]
    cnt[rem] += 1
    tens = tens * 10 % 2019
print(ans)
# Original solution
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**8)
INF = float("inf")


def solve(S: str):
    N = len(S)

    U = [0]*(N+1)
    a = 0
    # for i in range(N-1, -1, -1):
    for i in range(N):
        a += (10**i)*int(S[N-1-i])
        a %= 2019
        U[i] = a
    # U = [int(S[i:]) % 2019 for i in range(N)] + [0]
    table = [0]*2019

    tot = 0
    # for i in range(N-1, -1, -1):
    for i in range(N):
        tot += table[U[N-1-i]]
        table[U[N-1-i]] += 1
    tot += table[0]
    print(tot)
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = str(next(tokens))  # type: str
    solve(S)


if __name__ == '__main__':
    main()


# Optimized solution
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**8)
INF = float("inf")


def solve(S: str):
    N = len(S)
    U = [0]*(N+1)
    a = 0
    beki = 1
    for i in range(N-1, -1, -1):
        a += beki*(ord(S[i])-ord("0"))
        a %= 2019
        beki = (beki*10) % 2019
        U[i] = a
    table = [0]*2019

    tot = 0
    for i in range(N-1, -1, -1):
        tot += table[U[i]]
        table[U[i]] += 1
    tot += table[0]
    print(tot)
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = str(next(tokens))  # type: str
    solve(S)


if __name__ == '__main__':
    main()
# Original solution
N = int(eval(input()))
dic = []
for _ in range(N):
  A = eval(input())
  if A in dic:
    dic.remove(A)
  else:
    dic.append(A)
print((len(dic)))

# Optimized solution
N = int(eval(input()))
dic = {}
for _ in range(N):
  A = eval(input())
  if A in dic:
    del dic[A]
  else:
    dic[A]=0
print((len(dic)))
# Original solution
import collections
n = int(eval(input()))
a = [int(eval(input())) for i in range(n)]
cnt = collections.Counter(a)
total = 0
for c, v in list(cnt.items()):
    if v%2 == 1:
        total += 1
print(total)

# Optimized solution
n = int(eval(input()))
s = set()
for i in range(n):
    a = int(eval(input()))
    if a in s:
        s.remove(a)
    else:
        s.add(a)
print((len(s)))
# Original solution
from collections import Counter


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


for key in set_number:
    if cnt_number[key] % 2 == 1:
        ans += 1


print(ans)

# Optimized solution
N = int(eval(input()))
lst_a = [int(eval(input())) for _ in range(N)]
lst_a.sort()
set_ans = set()


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


print(ans)
# Original solution
import collections
n=int(eval(input()))
a=[]
for _ in range(n):
    a.append(eval(input()))
c=collections.Counter(a)
tmp=[]
for k,v in list(c.items()):
    if v%2!=0: 
        tmp.append(k)
print((len(tmp)))

# Optimized solution
from collections import Counter
n=int(eval(input()))
a=[]
for _ in range(n):
    a.append(eval(input()))
c=Counter(a)
tmp=[]
for k,v in list(c.items()):
    if v%2!=0: 
        tmp.append(k)
print((len(tmp)))
# Original solution
def index(a, x):
    'Locate the leftmost value exactly equal to x'
    i = bisect.bisect_left(a, x)
    if i != len(a) and a[i] == x:
        return i
    return -1

n = int(eval(input()))
import bisect
dat = []
for i in range(n):
    x = int(eval(input()))
    a =  index(dat, x)
    if a == -1:
        bisect.insort_left(dat, x)
    else:
        del dat[a]
print((len(dat)))

# Optimized solution
dat = dict()

n = int(eval(input()))
import bisect
for i in range(n):
    x = int(eval(input()))
    if x in dat:
        del dat[x]
    else:
        dat[x] = 1

print((len(dat)))
# Original solution
N = int(eval(input()))

a = []
for i in range(N):
    x = int(eval(input()))
    if x in a:
        a.remove(x)
    else:
        a.append(x)
print((len(a)))


# Optimized solution
N = int(eval(input()))

a = {}
for i in range(N):
    x = eval(input())
    if x in a:
        del a[x]
    else:
        a[x] = 0
print((len(a)))
# Original solution
#C-write and erase
n=int(eval(input()))
a=[int(eval(input())) for i in range(n)]
a.sort()

b=0
c=0
while b!=n:
    d=a.count(a[b]) 
    if d%2==0:
        c+=0
    else:
        c+=1
    b+=d
    
print(c)



# Optimized solution
#073C write and erase

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

print((len(s)))
# Original solution
import sys
n = int(eval(input()))
a = [int(i) for i in sys.stdin]
a.sort()
b = list(set(a))
count=0
for i in range(len(b)):
  if a.count(b[i])%2!=0:
    count+=1
print(count)

    


# Optimized solution
import sys
n = int(eval(input()))
a = [int(i) for i in sys.stdin]
a.sort()
dict = {}
for i in range(n):
  if a[i] in dict:
    del dict[a[i]]
  else: 
  	dict[a[i]]=0
print((len(dict)))
# Original solution
#073_C
n=int(eval(input()))
s=set()
for _ in range(n):
    s=s^{eval(input())}
print((len(s)))

# Optimized solution
N=int(eval(input()))
s=set()
for i in range(N):s^={eval(input())}
print((len(s)))
# Original solution
n = int(eval(input()))
nums = [int(eval(input())) for _ in range(n)]
cnt = {}
ans = 0
for x in nums:
    if x not in cnt:
        cnt[x] = 1
    else:
        cnt[x] += 1
for y in list(cnt.values()):
    if y % 2 != 0:
        ans += 1

print(ans)

# Optimized solution
N = int(eval(input()))


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

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

print(cnt)
# Original solution
import bisect
# 操作回数を入力する
N = int(eval(input()))
# 言う数字を入力する
list_A = [int(eval(input())) for _ in range(N)]
# 紙の状態を設定する
paper = []
# 
for A in list_A:
    if paper == []:
        paper.append(A)
        continue
    # 紙上のAをニ分探索する
    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)))

# Optimized solution
# 操作回数を入力する
N = int(eval(input()))
# 言う数字を入力する
list_A = [int(eval(input())) for _ in range(N)]
# 数字を昇順に並べる
list_A.sort()
# 終了後に残っている数字の数を設定する
ans = 0
# 直前の数字を設定する
num = 0
# ある数字が連続している回数を設定する
count = 0
# 昇順に並んだ各数字Aについて、、
for A in list_A:
    # 数字Aが直前の数字と同じ場合、、
    if A == num:
        # 連続回数を増やす
        count += 1
    # 数字Aが直前の数字と異なる場合、、
    else:
        # 直前の数字の連続回数が奇数の場合、、
        if count % 2 != 0:
            # 終了後に残っている数字の数を増やす
            ans += 1
        # 直前の数字と連続回数を更新する
        num = A
        count = 1        
# 最後の数字について、連続回数が奇数の場合、終了後に残っている数字の数を増やす
if count % 2 != 0:
    ans += 1
# 結果を出力する
print(ans)
# Original solution
from collections import Counter
N = int(eval(input()))
A = Counter([int(eval(input())) for _ in range(N)])

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

# Optimized solution
N = int(eval(input()))
A = [eval(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 list(a.values()):
  if i % 2 != 0:
    ans += 1
print(ans)
# Original solution
N = int(eval(input()))
data = []
for i in range(N):
    num = int(eval(input()))
    if num in data:
        data.remove(num)
    else:
        data.append(num)
print((len(data)))


# Optimized solution
import sys

data = set()
N = int(sys.stdin.readline())

for i in range(N):
    num = int(sys.stdin.readline())
    if num in data:
        data.remove(num)
    else:
        data.add(num)
print((len(data)))
# Original solution
from collections import Counter

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

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


# Optimized solution
n = int(eval(input()))
a_d = {}
for i in range(n):
    a = int(eval(input()))
    if a in a_d:
        a_d[a] += 1
    else:
        a_d[a] = 1
 
ans = 0
for i in list(a_d.values()):
    if i % 2:
        ans += 1
print(ans)
# Original solution
def m():
    N = int(eval(input()))
    A = [int(eval(input())) for _ in range(N)]
    ans = []
    for a in A: ans.remove(a) if a in ans else ans.append(a)
    return len(ans)

print((m()))


# Optimized solution
def m():
    N = int(eval(input()))
    A = [int(eval(input())) for _ in range(N)]
    A.sort()
    tmp = -1
    cnt = 0
    ans = 0
    for i in range(N):
        if tmp == A[i]:
            cnt +=1
        else:
            if cnt % 2 == 0: pass
            else: ans +=1
            tmp = A[i]
            cnt = 1

    if cnt % 2 == 0: pass
    else: ans += 1
    return ans

print((m()))
# Original solution
def writeanderase(n , a):

    ans = []

    for i in range(n):
        if ans.count(a[i]) == 0:
            ans.append(a[i])
        else:
            ans.remove(a[i])

    return len(ans)

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

if __name__ == '__main__':
    main()

# Optimized solution
def writeanderase(n , a):

    ans = {}
    count = 0

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

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

    return count

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

if __name__ == '__main__':
    main()
# Original solution
import collections
N = int(eval(input()))
ans = 0
now = 0
k = []
for i in range(N):
  A = int(eval(input()))
  k.append(A)
p = collections.Counter(k)
for i in p:
  if p[i]%2 == 1:
    ans += 1
print(ans)

# Optimized solution
N = int(eval(input()))
dict1 = {}
for i in range(N):
  A = eval(input())
  if A in dict1:
    del dict1[A]
  else:
    dict1[A] = 1
print((len(dict1)))
# Original solution
N = eval(input())

l = []

for i in range(N):
    x = eval(input())
    if (x in l):
        l.remove(x)
    else:
        l.append(x)

print(len(l))


# Optimized solution
N = eval(input())

l = []

for i in range(N):
    l.append(eval(input()))

l.sort()

ptr = 0
res = 0
while ptr < N:
    cc = l[ptr]
    f = 0
    while (ptr < N and l[ptr] == cc):
        f += 1
        ptr += 1
    res += f%2

print(res)
# Original solution
#!usr/bin/env python3
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

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

#B
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)

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

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

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

#F
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]))

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

#H
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

#Solve
if __name__ == "__main__":
    J()


# Optimized solution
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.buffer.readline().split()]
def I(): return int(sys.stdin.buffer.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    n = I()
    a = IR(n)
    s = defaultdict(lambda : 0)
    for i in a:
        s[i] ^= 1
    print((sum(s.values())))
    return

#Solve
if __name__ == "__main__":
    solve()
# Original solution
n=int(eval(input()))
A=[]
for i in range(n):
    a=eval(input())
    if a in A:
        A.remove(a)
    else:
        A.append(a)
print((len(A)))

# Optimized solution
n=int(eval(input()))
A=set()
for i in range(n):
    a=eval(input())
    if a in A:
        A.remove(a)
    else:
        A.add(a)
print((len(A)))
# Original solution
n=int(eval(input()))
a=[]
ans=0
for i in range(n):
    x=int(eval(input()))
    try:
        del a[a.index(x)]
    except:
        a.append(x)
print((len(a)))


# Optimized solution
n=int(eval(input()))
d={}
ans=0
for i in range(n):
    a=int(eval(input()))
    try:
        if d[a]%2==0:
            ans+=1
            d[a]+=1
        else:
            ans-=1
            d[a]+=1
    except:
        d[a]=1
        ans+=1
print(ans)
# Original solution
n=int(eval(input()))
As=[int(eval(input())) for _ in range(n)]
As.sort()
As_uniq=list(set(As))

ans=0
for uniq in As_uniq:
  if As.count(uniq)%2==1:
    ans+=1
print(ans)

# Optimized solution
n=int(eval(input()))
As=[int(eval(input())) for _ in range(n)]
As.sort()
As_uniq=list(set(As))

ans=0
c=1
for i in range(1,n):
  if As[i]==As[i-1]:
    c+=1
  else:
    if c%2==1:
      ans+=1
    c=1
if c % 2 == 1:
  ans += 1
print(ans)
# Original solution

from bisect import bisect_left,bisect_right

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

A_unique = list(set(A_list))


A_list.sort()

ans = 0
for a in A_unique:
    if (bisect_right(A_list,a)-bisect_left(A_list,a))%2 == 1:
        ans += 1
        
print(ans)

# Optimized solution
N = int(eval(input()))
A_list = []
for i in range(N):
    A_list.append(int(eval(input())))
    
A_list.sort()

res = 0
cnt = 0
ans = 0
for a in A_list:
    if res == a:
        cnt += 1
    else:
        ans += cnt%2
        res = a
        cnt = 1
        
ans += cnt%2

print(ans)
# Original solution
from collections import Counter

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

cntr = Counter(A)

ans = 0
for v in list(cntr.values()):
    ans += v%2

print(ans)

# Optimized solution
n = int(eval(input()))
a = [int(eval(input())) for _ in range(n)]


a_set = set()
for ai in a:
    if ai in a_set:
        a_set.remove(ai)
    else:
        a_set.add(ai)
        
print((len(a_set)))
# Original solution
N=int(eval(input()))
a=[0]*N
s=set()
for i in range(N):
	a[i] = int(eval(input()))
	s.add(a[i])
res=0
for j in s:
	res += (1 if not a.count(j) % 2 == 0 else 0)

print(res)

# Optimized solution
N=int(eval(input()))
a=[0]*N
s={}
for i in range(N):
	a[i] = int(eval(input()))
	if a[i] not in s:
		s[a[i]] = 1
	else:
		s[a[i]] += 1

res=0
for key,value in list(s.items()):
#	print(key,value)
	res += (1 if not value % 2 == 0 else 0)

print(res)
# Original solution
N = int(eval(input()))
a = []
for i in range(N):
  b = int(eval(input()))
  if b in a:
    del a[a.index(b)]
  else:
    a.append(b)
print((len(a)))

# Optimized solution
N = int(eval(input()))
a =set([])
for i in range(N):
  b = int(eval(input()))
  if b in a:
    a.remove(b)
  else:
    a.add(b)
print((len(a)))
# Original solution
N = int(eval(input()))
A = [int(eval(input())) for _ in range(N)]
counter = 0

while A:
    x = A[0]
    if A.count(x) % 2 == 1:
        counter += 1
    A = [i for i in A if i != x]

print(counter)


# Optimized solution
N = int(eval(input()))
maps = {}

for _ in range(N):
    A = int(eval(input()))
    if A in maps:
        maps.pop(A)
    else:
        maps[A] = 1

print((len(maps)))
# Original solution
n = int(eval(input()))
a = []
for i in range(n):
    a.append(int(eval(input())))
    
count = 0
for i in range(1,10**5+1):
    if a.count(i) % 2 != 0:
        count += 1
print(count)

# Optimized solution
n = int(eval(input()))
a = []
for i in range(n):
    a.append(int(eval(input())))
    
check = {}
for i in set(a):
    check[i] = 0
for i in a:
    check[i] += 1
    
count = 0
for i in list(check.items()):
    if i[1] % 2 != 0:
        count += 1
print(count)
# Original solution
N = int(eval(input()))
lis = []
for i in range(N):
  A = int(eval(input()))
  if A in lis:
    lis.remove(A)
  else:
    lis.append(A)
print((len(lis)))

# Optimized solution
N = int(eval(input()))
dic = {}
for i in range(N):
  A = int(eval(input()))
  if A not in dic:
    dic[A]=1
  else:
    dic[A]^=1
print((sum(dic.values())))
# Original solution
from collections import Counter
n = int(eval(input()))
a = [int(eval(input())) for i in range(n)]
ac = Counter(a)
ans = 0
for v in list(ac.values()):
    if v%2 & 1:
        ans += 1
print(ans)

# Optimized solution
s = set()
for i in range(int(eval(input()))):
    a = int(eval(input()))
    if a in s:
        s.remove(a)
    else:
        s.add(a)
print((len(s)))
# Original solution
from collections import *
N = int(eval(input()))
C = Counter([int(eval(input())) for n in range(N)]) 
A = [1 for v in list(C.values()) if v%2==1]
print((sum(A)))

# Optimized solution
N,*A = open(0)
S = set()

for a in A:
  S^={int(a)}

print((len(S)))
# Original solution
from collections import Counter
N = int(eval(input()))
src = [int(eval(input())) for i in range(N)]
counter = Counter(src)

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


# Optimized solution
N = int(eval(input()))
src = [int(eval(input())) for i in range(N)]

ss = set()
for a in src:
    if a in ss:
        ss.remove(a)
    else:
        ss.add(a)
print((len(ss)))
# Original solution
from collections import Counter
N = int(eval(input()))
A = [int(eval(input())) for i in range(N)]
ctr = Counter(A)

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

# Optimized solution
N = int(eval(input()))
A = [int(eval(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)))
# Original solution
N=int(eval(input()))
B=[]

for i in range(N):
    a=int(eval(input()))
    if a in B:
        B.remove(a)
    else:
        B.append(a)
print((len(B)))

# Optimized solution
N=int(eval(input()))
B=set()

for i in range(N):
    a=int(eval(input()))
    if a in B:
        B.remove(a)
    else:
        B.add(a)
print((len(B)))
# Original solution
n = int(eval(input()))
paper = []
for _ in range(n):
    x = int(eval(input()))
    if x in paper:
        paper.remove(x)
    else:
        paper.append(x)
print((len(paper)))

# Optimized solution
n = int(eval(input()))
paper = {}
for _ in range(n):
    x = int(eval(input()))
    if x in paper:
        paper[x] += 1
    else:
        paper[x] = 1
count = 0
for i in list(paper.values()):
    if i % 2 != 0: count += 1
print(count)
# Original solution
from collections import Counter
n, *A = list(map(int, open(0).read().split()))
ans = 0
for v in  list(Counter(A).values()):
  if v % 2 == 1:
    ans += 1
print(ans)

# Optimized solution
from collections import Counter
n, *A = list(map(int, open(0).read().split()))
print((sum(v % 2 for v in  list(Counter(A).values()))))
# Original solution
n = int(eval(input()))
A = [int(eval(input())) for i in range(n)]

b = list()
lenB = 0
for a in A:
    b.append(a)
    lenB += 1
    if len(set(b)) != lenB:
        b.pop(-1)
        b.remove(a)
        lenB -= 2
print((len(b)))


# Optimized solution
n = int(eval(input()))
A = [int(eval(input())) for i in range(n)]

b = set()
lenB = 0
for a in A:
    b.add(a)
    lenB += 1
    if len(b) != lenB:
        b.remove(a)
        lenB -= 2
print((len(b)))
# Original solution
A=[int(eval(input())) for _ in range(int(eval(input())))]
l=sorted(set(A))
cnt=0
for i in range(len(l)):
    if A.count(l[i])%2: cnt+=1
print(cnt)

# Optimized solution
n=int(eval(input()))
a={}
for _ in range(n):
    x=int(eval(input()))
    if x in a: a[x]+=1
    else: a[x]=1
ans=0
for i in a:
    if a[i]%2: ans+=1
print(ans)
# Original solution
import heapq
n = int(eval(input()))
a_list = []

for i in range(n):
    a = int(eval(input()))
    if a in a_list:
        a_list.remove(a)
    else:
        heapq.heappush(a_list, a)

print((len(a_list)))


# Optimized solution
n = int(eval(input()))
d = dict()
for i in range(n):
    a = int(eval(input()))
    if a in d:
        if d[a] == 0:
            d[a] = 1
        else:
            d[a] = 0
    else:
        d[a] = 1

print((sum(d.values())))
# Original solution
import sys
input = sys.stdin.readline

import bisect

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

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


    print((len(s)))


main()


# Optimized solution
N=int(eval(input()))
s=set()
for i in range(N):s^={eval(input())}
print((len(s)))
# Original solution
N = int(eval(input()))
L = [int(eval(input())) for i in range(N)]
P = list(set(L))
ans = 0
for i in range(len(P)) :
    p = L.count(P[i])
    if p % 2 != 0 :
        ans += 1
print(ans)


# Optimized solution
N = int(eval(input()))
D = {}
for i in range(N) :
    index = int(eval(input()))
    if index not in D :
        D[index] = 1
    else :
        D[index] += 1
ans = 0
for i in D :
    if D[i] % 2 != 0 :
        ans += 1
print(ans)
# Original solution
from collections import Counter
def ABC073C_WriteAndErase():
    N = int(input().strip())
    
    Ai = Counter()
    for i in range(N):
        num = int(eval(input()))

        if num in list(Ai.keys()):
            del Ai[num]
        else:
            Ai[num] = 1

    print((len(Ai)))
    

def main():
    ABC073C_WriteAndErase()

if __name__ == "__main__":
    main()


# Optimized solution
from collections import Counter
def ABC073C_WriteAndErase():
    N = int(input().strip())
    Ai = [int(input().strip()) for i in range(N)]


    Bi = Counter(Ai)
    count = 0
    for key, val in list(Bi.items()):
        if val % 2 == 1:
            count += 1

    print(count)
    

def main():
    ABC073C_WriteAndErase()

if __name__ == "__main__":
    main()
# Original solution
from collections import defaultdict

def solve():
    dic = defaultdict(int)
    n = int(eval(input()))
    ans = 0
    for _ in range(n):
        a = int(eval(input()))
        dic[a] = (dic[a] + 1) % 2
    print((sum(dic.values())))

if __name__ == '__main__':
    solve()

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