CodeEff/ECCO huggingface dataset:
# Original solution
s = input()[::-1]
ans = 0
data = [0 for _ in range(2019)]
now = 0
data[0] = 1
for i,x in enumerate(s):
    now += int(x)*10**i
    now %= 2019
    data[now] += 1
    #print(now)

for i in range(2019):
    ans += data[i]*(data[i]-1)//2

print(ans)

# Optimized solution
s = input()[::-1]
n = len(s)
ans = 0
data = [0 for _ in range(2019)]
now = 0
data[0] = 1
q = [1]
x = 1
for i in range(n):
    x *= 10
    x %= 2019
    q.append(x)

for i,x in enumerate(s):
    now += int(x)*q[i]
    now %= 2019
    data[now] += 1
    #print(now)

for i in range(2019):
    ans += data[i]*(data[i]-1)//2

print(ans)
# Original solution
s=input().rstrip()
ans=[0 for i in range(2019)]
tmp=0
a=0
rs=reversed(s)
for i in rs:
    ans[tmp%2019]+=1
    tmp=tmp+int(i)*10**a
    a+=1
ans[tmp%2019]+=1
count=0
for i in ans:
    count+=int(i*(i-1)/2)
print(count)

# Optimized solution
s=input().rstrip()
ans=[0 for i in range(2019)]
tmp=0
a=1
rs=reversed(s)
for i in rs:
    ans[tmp%2019]+=1
    tmp=(tmp+int(i)*a)%2019
    a*=10
    a%=2019
ans[tmp%2019]+=1
count=0
for i in ans:
    count+=int(i*(i-1)/2)
print(count)
# Original solution
import sys

input = sys.stdin.readline


def main():
    S = input().rstrip()

    n = len(S)
    counts = [0] * 2019
    counts[0] += 1
    T = [0] * (n+1)
    for i in reversed(list(range(n))):
        T[i] = (10**(n-1-i) * int(S[i]) + T[i+1]) % 2019
        counts[T[i]] += 1

    ans = 0
    for c in counts:
        ans += c*(c-1)//2  # cC2
    print(ans)


if __name__ == "__main__":
    main()


# Optimized solution
import sys

input = sys.stdin.readline

P = 2019

def main():
    S = input().rstrip()

    n = len(S)
    counts = [0] * P
    counts[0] += 1
    T = 0
    d = 1
    for s in reversed(S):
        T = (T + (d * int(s)) % P) % P
        d = (d * 10) % P
        counts[T] += 1

    ans = 0
    for c in counts:
        ans += c*(c-1)//2  # cC2
    print(ans)


if __name__ == "__main__":
    main()
# Original solution
import sys

input = sys.stdin.readline
P = 2019


def main():
    S = input().rstrip()

    N = len(S)
    count = [0] * P
    count[0] += 1
    T = 0
    for i in range(N):
        T = (T + int(S[(N - 1) - i]) * pow(10, i, mod=P)) % P
        count[T] += 1

    ans = 0
    for k in count:
        ans = (ans + k * (k - 1) // 2)
    print(ans)


if __name__ == "__main__":
    main()


# Optimized solution
import sys

input = sys.stdin.readline
P = 2019


def main():
    S = input().rstrip()

    count = [0] * P
    count[0] += 1
    T = 0
    d = 1
    for s in reversed(S):
        T = (T + int(s) * d) % P
        count[T] += 1
        d = (d * 10) % P

    ans = 0
    for k in count:
        ans += k * (k - 1) // 2
    print(ans)


if __name__ == "__main__":
    main()
# Original solution
original = input()[::-1]

target = 2019

# s = reversed(original)

counts = [0] * 2019
counts[0] = 1

digit = 1
mod = 0
for c in original:
    val = int(c) * digit
    currentMod = val % target
    mod = (currentMod + mod) % target
    digit *= 10

    counts[mod] += 1
    # count = countOfMod.get(mod, 0) + 1
    # countOfMod[mod] = count
    # if countOfMod[mod] > 1:
    #     results.setdefault(mod, int(count*(count-1)/2))

# print(sum(results.values()))

ans = 0
for cnt in counts:
    ans += cnt * (cnt - 1) // 2

print(ans)  # 答えの出力

# Optimized solution
original = input()[::-1]

target = 2019

# s = reversed(original)

counts = [0] * 2019
counts[0] = 1

num, d = 0, 1
digit = 1
mod = 0
for c in original:
    # val = int(c) * digit
    # currentMod = val % target
    # # mod = (currentMod + mod) % target
    # digit *= 10
    #
    # counts[mod] += 1
    num += int(c) * d
    num %= 2019
    d *= 10
    d %= 2019
    counts[num] += 1

# print(sum(results.values()))

ans = 0
for cnt in counts:
    ans += cnt * (cnt - 1) // 2

print(ans)  # 答えの出力
# Original solution
import sys
readline = sys.stdin.readline
from collections import Counter
MOD = 2019

def main():
    S = readline().rstrip()
    N = len(S)
    T = [0] * (N+1)
    for i in range(N-1, -1, -1):
        T[i] = (T[i+1] + int(S[i]) * 10**(N-1-i)) % MOD
    
    c = Counter(T)
    ans = 0
    for k, v in list(c.items()):
        ans += (v * (v-1)) // 2
    print(ans)


if __name__ == '__main__':
    main()

# Optimized solution
import sys
readline = sys.stdin.readline
from collections import Counter
MOD = 2019

def main():
    S = list(map(int, list(readline().rstrip())))
    N = len(S)
    T = [0] * (N+1)
    e = 1
    for i in range(N-1, -1, -1):
        T[i] = (T[i+1] + int(S[i]) * e) % MOD
        e = e * 10 % MOD
    
    T = [t % MOD for t in T]
    c = Counter(T)
    ans = 0
    for k, v in list(c.items()):
        ans += (v * (v-1)) // 2
    print(ans)


if __name__ == '__main__':
    main()
# Original solution
import sys
readline = sys.stdin.readline
from collections import Counter
MOD = 2019

def main():
    S = list(map(int, list(readline().rstrip())))
    N = len(S)
    T = [0] * (N+1)
    e = 1
    for i in range(N-1, -1, -1):
        T[i] = (T[i+1] + int(S[i]) * e) % MOD
        e = e * 10 % MOD
    
    T = [t % MOD for t in T]
    c = Counter(T)
    ans = 0
    for k, v in list(c.items()):
        ans += (v * (v-1)) // 2
    print(ans)


if __name__ == '__main__':
    main()

# Optimized solution
import sys
readline = sys.stdin.readline
from collections import Counter
MOD = 2019

def main():
    S = list(map(int, list(readline().rstrip())))
    N = len(S)
    T = [0] * (N+1)
    e = 1
    for i in range(N-1, -1, -1):
        T[i] = (T[i+1] + int(S[i]) * e) % MOD
        e = e * 10 % MOD
    
    c = Counter(T)
    ans = 0
    for k, v in list(c.items()):
        ans += (v * (v-1)) // 2
    print(ans)


if __name__ == '__main__':
    main()
# Original solution
import math

def comb_count(n, r):
    return math.factorial(n) // math.factorial(r) // math.factorial(n - r)

S = input()[::-1]
ans = 0

mods = [0] * 2019 #余りが0~2018
mods[0] = 1
current = 0
tmp = 1

for i in range(len(S)):
    current = (int(S[i]) * tmp + current) % 2019
    mod = current % 2019
    # ans += mods[mod]
    mods[mod] += 1
    tmp = tmp * 10

for mod in mods:
    if mod > 1:
        # print(mod)
        ans += comb_count(mod, 2)

print(ans)


# Optimized solution
import math

def comb_count(n, r):
    return math.factorial(n) // math.factorial(r) // math.factorial(n - r)

S = input()[::-1]
ans = 0

mods = [0] * 2019 #余りが0~2018
mods[0] = 1
current = 0
tmp = 1

for i in range(len(S)):
    current = int(S[i]) * tmp + current
    mod = current % 2019
    mods[mod] += 1
    tmp = tmp * 10 % 2019

for mod in mods:
    if mod > 1:
        ans += comb_count(mod, 2)

print(ans)
# Original solution
N = int(eval(input()))

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

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

l = set([])
for _ in range(N):
    a = int(eval(input()))
    if a in l:
        l.remove(a)
    else:
        l.add(a)
print((len(l)))
# Original solution
N=int(eval(input()))
A=[int(eval(input())) for i in range(N)]
print((len([i for i in list(set(A)) if A.count(i)%2==1])))

# Optimized solution
N=int(eval(input()))
A=[int(eval(input())) for i in range(N)]
dict = {}
for i in A:
  if i not in dict:
    dict[i] = 1
  else:
    dict[i] += 1
print((len([1 for i in list(dict.values()) if i%2!=0])))
# Original solution
from collections import Counter
print((len([1 for i in list(Counter([int(eval(input())) for i in range(int(eval(input())))]).values()) if i%2!=0])))

# Optimized solution
import collections;print((len([1 for i in list(collections.Counter([int(eval(input())) for i in range(int(eval(input())))]).values()) if i%2!=0])))
# Original solution
import collections as c
print((sum([1 for i in list(c.Counter([int(eval(input())) for _ in range(int(eval(input())))]).values()) if i%2!=0])))

# Optimized solution
import collections as c;print((sum([i%2!=0 for i in list(c.Counter([int(eval(input())) for _ in range(int(eval(input())))]).values())])))
# Original solution
n=int(eval(input()))
a=[]
for i in range(n):
  x=int(eval(input()))
  if x not in a:a.append(x)
  else:a.remove(x)
print((len(a)))

# Optimized solution
n=int(eval(input()))
a=[int(eval(input())) for i in range(n)]
a=sorted(a)
x=a[0]
c=1
ct=0
for i in range(1,n):
  if a[i]==x:
    c+=1
    if i==n-1:
      if c%2==1:
        ct+=1
  else:
    if c%2==1:
      ct+=1
    x=a[i]
    c=1
    if i==n-1:
      ct+=1
print(ct)
# Original solution
N = int(eval(input()))
A = []
for i in range(N):
    num = int(eval(input()))
    if num in A:
        A.remove(num)
    else:
        A.append(num)

print((len(A)))

# Optimized solution
N = int(eval(input()))
A = [int(eval(input())) for i in range(N)]
dic = {}
for i in A:
    if i in dic:
        dic[i] += 1
    else:
        dic[i] = 1
ans = 0
for i in list(dic.keys()):
    if dic[i] % 2 == 1:
        ans += 1
print(ans)
# Original solution
n=int(eval(input()))
outp=[]
for i in range(n):
  outp.append(int(eval(input())))
num=0
for j in list(set(outp)):
  num+=outp.count(j)%2
print(num)


# Optimized solution
n=int(eval(input()))
outp=set()
for i in range(n):
  a=int(eval(input()))
  if(a in outp):outp.remove(a)
  else:outp.add(a)
print((len(outp)))
# Original solution
nums = int(eval(input()))
ary = list(range(nums))

for i in range(nums):
    ary[i] = int(eval(input()))
x = 0
count = 0
ary.sort()

while x < nums:
    check = ary.count(ary[x])
    if check % 2 == 1:
        count += 1
        x += check-1
    elif check > 0:
        x += check-1
    x += 1
print(count)

# Optimized solution
nums = int(eval(input()))
ary = list(range(nums))
check_number = [0 for i in range(nums+2)]
for i in range(nums):
    ary[i] = int(eval(input()))

ary.sort()
check = 0
count = 0
result = 0
x = 0
for i in ary :
    if check == i:
        check_number[x] += 1
    else:
        check = i
        x += 1
        check_number[x] = 1

for i in check_number:
    if i % 2 == 1:
        result += 1
print (result)
# Original solution
a = set()
for i in range(int(eval(input()))):
    a = a^set([int(eval(input()))])
print((len(a)))

# Optimized solution
a = set()
for i in range(int(eval(input()))):
    a ^= {eval(input())}
print((len(a)))
# Original solution
N=int(eval(input()))
s=[int(eval(input())) for i in range(N)]
d,ans={},0
for j in s:
    d[j]=d.get(j,0)+1
d=list(d.values())
for k in range(len(d)):
    if d[k]%2==1:
        ans+=1
print(ans)   

# Optimized solution
N=int(eval(input()))
s=[int(eval(input())) for i in range(N)]
d,ans={},0
for j in s:
    d[j]=d.get(j,0)+1
d=list(d.values())
for k in d:
    if k%2==1:
        ans+=1
print(ans)
# Original solution
N = int(eval(input()))
A = []
for _ in range(N):
    A.append(int(eval(input())))
C = set(A)
B = [0]*N
i = 0
for a in C:
    B[i] += A.count(a)
    i += 1
B = [i%2 for i in B]
print((B.count(1)))


# Optimized solution
N = int(eval(input()))
A = [int(eval(input())) for _ in range(N)]
B = {}
for i in A:
    if i not in B:
        B[i] = 1
    else:
        if B[i] == 1:
            B[i] -= 1
        else:
            B[i] += 1
cnt = 0
for j in list(B.keys()):
    if B[j] == 1:
        cnt += 1
print(cnt)
# Original solution
n = int(eval(input()))
a = {}
for i in range(n):
    s = int(eval(input()))
    if s in list(a.keys()):
        flag = False
    else:
        flag = True
    if flag:
        a[s] = 1
    else:
        if a[s] == 1:
            a[s] = 0
        else:
            a[s] = 1
print((sum(a.values())))


# Optimized solution
n = int(eval(input()))
a = []
for i in range(n):
    s = int(eval(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)
# Original solution
n=int(eval(input()))
s=[]

for i in range(n):
    a=str(eval(input()))
    if a in s:
        s.remove(a)
    else:
        s.append(a)

print((len(s)))



# 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 defaultdict
d = defaultdict(int)
n = int(input())
for _ in range(n):
    d[int(input())] += 1
print(len([x for x in list(d.values()) if x % 2 == 1]))


# Optimized solution
from collections import Counter
n = int(input())
c = Counter([int(input()) for _ in range(n)])
print(len([x for x in list(c.values()) if x % 2 == 1]))
# Original solution
from collections import Counter
c = Counter([int(input()) for _ in range(int(input()))])
print(len([x for x in list(c.values()) if x % 2 == 1]))


# Optimized solution
from collections import Counter
print(len([x for x in list(Counter([int(input()) for _ in range(int(input()))]).values()) if x % 2 == 1]))
# Original solution
a =list()
n = int(eval(input()))
for _ in range(n):
    tmp = int(eval(input())) 
    if tmp in a:
        a.remove(tmp)
    else:
        a.append(tmp)
print((len(a)))

# Optimized solution
a =set()
n = int(eval(input()))
for _ in range(n):
    tmp = int(eval(input())) 
    if tmp in a:
        a.remove(tmp)
    else:
        a.add(tmp)
print((len(a)))
# Original solution
N=int(eval(input()))
A = []
ans =[]
for i in range(N):
    new = int(eval(input()))
    if new not in ans:
        ans.append(new)

    else:
        ans.remove(new)


print((len(ans)))


# Optimized solution
N=int(eval(input()))
A = []

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

A.sort()
A.append(0)

start=A[0]
cnt=1
anscnt=0

for i in range(1,len(A)):

    if A[i]==start:
        cnt+=1
    elif A[i]!=start:
        if cnt%2==0:
            anscnt+=cnt
        elif cnt%2!=0:
            anscnt+=cnt-1    
        cnt=1
        start=A[i]


print((N-anscnt))
# Original solution
from collections import Counter
def main():
    n = int(eval(input()))
    l1 = []
    for _ in range(n):
        l1.append(eval(input()))
    l1c = Counter(l1)
    l1c2 = [c for c in l1c if l1c[c]%2 != 0]
    print((len(l1c2)))

if __name__ == '__main__':
    main()


# Optimized solution
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from collections import Counter
def main():
    n = eval(input())
    a = tuple(map(int, readlines()))
    ac = Counter(a)
    ac2 = [c % 2 for c in list(ac.values())]
    r = sum(ac2)
    print(r)
if __name__ == '__main__':
    main()
# Original solution
import math
import collections
import fractions
import itertools
import functools
import  operator

def solve():
    n = int(eval(input()))
    p = []
    for _ in range(n):
        num = int(eval(input()))
        if num in p:
            del p[p.index(num)]
        else:
            p.append(num)
    print((len(p)))
    return 0

if __name__ == "__main__":
    solve()

# Optimized solution
import math
import collections
import fractions
import itertools
import functools
import  operator

def solve():
    n = int(eval(input()))
    a = [int(eval(input())) for _ in range(n)]
    c = collections.Counter(a)
    cnt = 0
    for i in c:
        if c[i] % 2 == 1:
            cnt += 1
    print(cnt)
    return 0

if __name__ == "__main__":
    solve()
# Original solution
def main():
  import collections
  import sys
  input = sys.stdin.readline
  n = int(eval(input()))
  b = []
  for i in range(n):
    a = int(eval(input()))
    b_append = b.append
    b_append(a)

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

# Optimized solution
def main():
  import collections
  import sys
  input = sys.stdin.readline
  n = int(eval(input()))
  b = []
  for i in range(n):
    a = int(eval(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()
# Original 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)))


# Optimized solution
import sys
input=sys.stdin.readline

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
# ABC073C - Write and Erase
import sys
input = sys.stdin.readline

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

# Optimized solution
# ABC073C - Write and Erase
def main():
    N, *A = list(map(int, open(0).read().split()))
    store = set()
    for a in A:
        if a in store:
            store.remove(a)
        else:
            store.add(a)
    ans = len(store)
    print(ans)


if __name__ == "__main__":
    main()
# Original solution
n = int(eval(input()))


al = []

for i in range(n):
    a = int(eval(input()))
    if al.count(a) > 0:
        al.remove(a)
    else:
        al.append(a)

print((len(al)))


# Optimized solution
n = int(eval(input()))
al = list(int(eval(input())) for _ in range(n))

s = set()

for a in al:
    s ^= {a}

print((len(s)))
# Original solution
N = int(eval(input()))
A = [int(eval(input())) for i in range(N)]
c = []
for i in A:
    if i in c:
        c.remove(i)
    else:
        c.append(i)
print((len(c)))

# Optimized solution
N = int(eval(input()))
A = [int(eval(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)
# Original solution
# -*- coding: utf-8 -*-

import sys


def main():
    _ = sys.stdin.readline()
    arr = []
    for line in sys.stdin:
        num = line.rstrip()
        if num in arr:
            arr.remove(num)
        else:
            arr.append(num)
    print((len(arr)))


if __name__ == "__main__":
    main()


# Optimized solution
# -*- coding: utf-8 -*-

import sys


def main():
    _ = sys.stdin.readline()
    arr = set()
    for line in sys.stdin:
        num = line.rstrip()
        if num in arr:
            arr.remove(num)
        else:
            arr.add(num)
    print((len(arr)))


if __name__ == "__main__":
    main()
# Original solution
# -*- coding: utf-8 -*-
a = int(eval(input()))
numlist = []
for i in range(a):
	b = int(eval(input()))
	if b in numlist:
		numlist.remove(b)
	else:
		numlist.append(b)
print((len(numlist)))

# Optimized solution
# -*- coding: utf-8 -*-
a = int(eval(input()))
b = set()
for i in range(a):
	b ^= {eval(input())}
print((len(b)))
# Original solution
n = int(eval(input()))
a = [0] * n
for i in range(n):
    a[i] = int(eval(input()))

a.sort()

checked = []
ans = 0
for i in range(n):
    count = 0
    if not a[i] in checked:
        for j in range(i,n):
            if a[j] == a[i]:
                count += 1
            else:
                break
        if count % 2 == 0:
            pass
        else:
            ans += 1
        checked.append(a[i])
print(ans)


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

a.sort()

pre = 0
ans = 0
for i in range(n):
    count = 0
    if a[i] != pre:
        for j in range(i,n):
            if a[j] == a[i]:
                count += 1
            else:
                break
        if count % 2 == 0:
            pass
        else:
            ans += 1
        pre = a[i]
print(ans)
# Original solution
N = int(eval(input()))
A = list(int(eval(input())) for _ in range(N))
s = []
for i in A:
    if i not in s:
        s.append(i)
    else:
        s.remove(i)
print((len(s)))

# Optimized solution
N = int(eval(input()))
A = list(int(eval(input())) for _ in range(N))
s = set()
for i in A:
    if i not in s:
        s.add(i)
    else:
        s.remove(i)
print((len(s)))
# Original solution
N = int(eval(input()))

ans_list = []
ans_cnt = 0
for i in range(N):
    A = int(eval(input()))
    if A in ans_list:
        ans_list.remove(A)
        ans_cnt -= 1
    else:
        ans_list.append(A)
        ans_cnt += 1
        
print(ans_cnt)


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

ans = set()
for i in range(N):
    A = int(eval(input()))
    if A not in ans:
        ans.add(A)
    else:
        ans.remove(A)
        
print((len(ans)))
# Original solution
n = int(eval(input()))
l = [int(eval(input())) for _ in range(n)]
ans = [x for x in set(l) if l.count(x) % 2 == 1]
print((len(ans)))

# Optimized solution
n = int(eval(input()))
l = {}
ans = 0
for _ in range(n):
    a = int(eval(input()))
    if a in l:
        l[a] += 1
    else:
        l[a] = 1
for v in list(l.values()):
    if v % 2 == 1:
        ans += 1
print(ans)
# Original solution
n = int(eval(input()))
d = {}
for i in range(n):
    a = int(eval(input()))
    if a in d:
        d[a] = not d[a]
    else:
        d[a] = True
ans = 0
for i in d:
    if d[i]: ans += 1
print(ans)

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

# Optimized solution
import sys
n = int(eval(input()))
d = set()
b = list(map(int,sys.stdin))
for a in b:
    if a in d:
        d.remove(a)
    else:
        d.add(a)
print((len(d)))
# Original solution
n=int(eval(input()))
a=[]
for _ in range(n):
    a.append(int(eval(input())))

count=0
for a_ele in set(a):
    if a.count(a_ele)%2==1:
        count+=1

print(count)

# Optimized solution
n=int(eval(input()))
a={}
for _ in range(n):
    num=int(eval(input()))
    if num not in a:
        a[num]=1
    else:
        a[num]+=1
all_count=0
for _, count in list(a.items()):
    if count%2==1:
        all_count+=1
print(all_count)
# Original solution
n = int(eval(input()))
a = [int(eval(input())) for _ in range(n)]
cnt = 0
a_set = set(a)
for i in a_set:
    if a.count(i) % 2 != 0:
        cnt += 1
print(cnt)


# Optimized solution
n = int(eval(input()))
D = {}
cnt = 0
for _ in range(n):
    a = int(eval(input()))
    if a not in D:
        D[a] = 1
    else:
        D[a] += 1
for i in D:
    if D[i] % 2 != 0:
        cnt += 1
print(cnt)
# Original solution
N = int(eval(input()))

A = []
numbers = {}
for i in range(N):
    num = int(eval(input()))
    if num not in A:
        A.append(num)
        
    if num in list(numbers.keys()):
        numbers[num] = (numbers[num] + 1)%2 
    else:
        numbers[num] = 1

##print(numbers)

count = 0
for i in range(len(A)):
    val = numbers[A[i]]
    if val == 1:
        count += 1

print(count)     

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

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

A.sort()


tmpcount = 1
count = 0
A.append(-1)

for i in range(1,N+1):
    if A[i] == A[i-1]:
        tmpcount += 1
    else:
        if tmpcount % 2 == 1:
            count += 1
        tmpcount = 1

print(count)
# Original solution
N=int(eval(input()))
s=set()
for i in range(N):s^={eval(input())}
print((len(s)))

# Optimized solution
#073_C
n=int(eval(input()))
s=set()
for _ in range(n):
    s^={eval(input())}
print((len(s)))
# Original solution
# input
N = int(eval(input()))
A = [int(eval(input())) for _ in range(N)]

Paper = []

for i in range(N):
    if A[i] in Paper:
        Paper.remove(A[i]) 
    else:
        Paper.append(A[i])

print((len(Paper)))


# Optimized solution
# input
N = int(eval(input()))
A = [int(eval(input())) for _ in range(N)]

A = sorted(A)
i = 0
ans = 0

while i < N:
    k = 1
    while (i + k) < N and A[i] == A[i + k]:
        k += 1
    if (k - 1) % 2 == 0:
        ans += 1
    i = i + k

print(ans)