N=int(eval(input()))

*A,=list(map(int,input().split()))

cnt = {}

for a in A:

    cnt[a] = cnt.get(a,0)+1

keys = sorted(cnt.keys())

i = 0

j = len(keys)-1

while i <= j:

    ki,kj = keys[i],keys[j]

    if cnt[ki]<=1:

        i+=1

        continue

    if cnt[kj]<=1:

        j-=1

        continue

    cnt[ki] -= 1

    cnt[kj] -= 1

print((sum(cnt.values())))
N = int(eval(input()))

*A, = list(map(int,input().split()))

c = {}

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

print((len(c) - sum(v-1 for v in list(c.values()))%2))
N = int(eval(input()))
(*A,) = list(map(int, input().split()))
cnt = {}
for a in A:
    cnt[a] = cnt.get(a, 0) + 1
keys = sorted(cnt.keys())
i = 0
j = len(keys) - 1
while i <= j:
    ki, kj = keys[i], keys[j]
    if cnt[ki] <= 1:
        i += 1
        continue
    if cnt[kj] <= 1:
        j -= 1
        continue
    cnt[ki] -= 1
    cnt[kj] -= 1
print((sum(cnt.values())))

N = int(eval(input()))
(*A,) = list(map(int, input().split()))
c = {}
for a in A:
    c[a] = c.get(a, 0) + 1
print((len(c) - sum(v - 1 for v in list(c.values())) % 2))

-cnt = {} +c = {} -    cnt[a] = cnt.get(a, 0) + 1 -keys = sorted(cnt.keys()) -i = 0 -j = len(keys) - 1 -while i <= j: -    ki, kj = keys[i], keys[j] -    if cnt[ki] <= 1: -        i += 1 -        continue -    if cnt[kj] <= 1: -        j -= 1 -        continue -    cnt[ki] -= 1 -    cnt[kj] -= 1 -print((sum(cnt.values()))) +    c[a] = c.get(a, 0) + 1 +print((len(c) - sum(v - 1 for v in list(c.values())) % 2))