n = int(eval(input()))



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

set_a = set(a)

nums = {}

cnt = 0



for i in range(n):

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





for i in set_a:

    if nums[i] % 2 == 0:

        cnt += 1

    elif nums[i] != 1:

        cnt += 2



print((len(set_a) - cnt%2))
from collections import Counter



N = int(eval(input()))

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

c = Counter(A)



cnt = 0

for v  in list(c.values()):

    cnt += v - 1



ans = len(set(A)) if cnt % 2 == 0 else len(set(A)) - 1

if ans == 0: ans = 1

print(ans)
n = int(eval(input()))
a = list(map(int, input().split()))
set_a = set(a)
nums = {}
cnt = 0
for i in range(n):
    nums[a[i]] = nums.get(a[i], 0) + 1
for i in set_a:
    if nums[i] % 2 == 0:
        cnt += 1
    elif nums[i] != 1:
        cnt += 2
print((len(set_a) - cnt % 2))

from collections import Counter

N = int(eval(input()))
A = list(map(int, input().split()))
c = Counter(A)
cnt = 0
for v in list(c.values()):
    cnt += v - 1
ans = len(set(A)) if cnt % 2 == 0 else len(set(A)) - 1
if ans == 0:
    ans = 1
print(ans)

-n = int(eval(input())) -a = list(map(int, input().split())) -set_a = set(a) -nums = {} +from collections import Counter + +N = int(eval(input())) +A = list(map(int, input().split())) +c = Counter(A) -for i in range(n): -    nums[a[i]] = nums.get(a[i], 0) + 1 -for i in set_a: -    if nums[i] % 2 == 0: -        cnt += 1 -    elif nums[i] != 1: -        cnt += 2 -print((len(set_a) - cnt % 2)) +for v in list(c.values()): +    cnt += v - 1 +ans = len(set(A)) if cnt % 2 == 0 else len(set(A)) - 1 +if ans == 0: +    ans = 1 +print(ans)