import collections

n = int(eval(input()))

c = collections.Counter(list(map(int,input().split())))

z = list(c.values())





ans = 0

for c in z:

    ans +=(1-c%2)



print((len(z)-ans%2))

import collections

n = int(eval(input()))

c = len(collections.Counter(list(map(int,input().split()))))

print((c-(1-c%2)))

import collections

n = int(eval(input()))
c = collections.Counter(list(map(int, input().split())))
z = list(c.values())
ans = 0
for c in z:
    ans += 1 - c % 2
print((len(z) - ans % 2))

import collections

n = int(eval(input()))
c = len(collections.Counter(list(map(int, input().split()))))
print((c - (1 - c % 2)))

-c = collections.Counter(list(map(int, input().split()))) -z = list(c.values()) -ans = 0 -for c in z: -    ans += 1 - c % 2 -print((len(z) - ans % 2)) +c = len(collections.Counter(list(map(int, input().split())))) +print((c - (1 - c % 2)))