from collections import*;n,l=open(0);a=sum(v-1for v in list(Counter(l.split()).values()));print((int(n)-a-(a%2)))
_,a=open(0);a=len(set(a.split()));print((a-(a%2<1)))
from collections import *

n, l = open(0)
a = sum(v - 1 for v in list(Counter(l.split()).values()))
print((int(n) - a - (a % 2)))

_, a = open(0)
a = len(set(a.split()))
print((a - (a % 2 < 1)))

-from collections import * - -n, l = open(0) -a = sum(v - 1 for v in list(Counter(l.split()).values())) -print((int(n) - a - (a % 2))) +_, a = open(0) +a = len(set(a.split())) +print((a - (a % 2 < 1)))