import functools

N = int(eval(input()))

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

d = [0 for i in range(10 ** 5 + 1)]

for a in A:

    d[a] = 1

s = sum(d)

print((s - (0 if s % 2 else 1)))
N = int(eval(input()))

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

d = [0 for i in range(10 ** 5 + 1)]

for a in A:

    d[a] = 1

s = sum(d)

print((s - (0 if s % 2 else 1)))
import functools

N = int(eval(input()))
A = list(map(int, input().split()))
d = [0 for i in range(10**5 + 1)]
for a in A:
    d[a] = 1
s = sum(d)
print((s - (0 if s % 2 else 1)))

N = int(eval(input()))
A = list(map(int, input().split()))
d = [0 for i in range(10**5 + 1)]
for a in A:
    d[a] = 1
s = sum(d)
print((s - (0 if s % 2 else 1)))

-import functools -