n=int(eval(input()))

a=[int(j) for j in input().split()]

tmp=len(set(a))

while n>tmp:

    n-=2

print(n)
n=int(eval(input()))

a=[int(j) for j in input().split()]

ans=len(set(a))

if (n-ans)%2==0:

    print(ans)

else:

    print((ans-1))

n = int(eval(input()))
a = [int(j) for j in input().split()]
tmp = len(set(a))
while n > tmp:
    n -= 2
print(n)

n = int(eval(input()))
a = [int(j) for j in input().split()]
ans = len(set(a))
if (n - ans) % 2 == 0:
    print(ans)
else:
    print((ans - 1))

-tmp = len(set(a)) -while n > tmp: -    n -= 2 -print(n) +ans = len(set(a)) +if (n - ans) % 2 == 0: +    print(ans) +else: +    print((ans - 1))