N=int(eval(input()))

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

da={}

for ll in la:

    if not ll in da:

        da[ll]=1

    elif da[ll]==1:

        da[ll]=2

    else:

        da[ll]=1

nev=0

for dd in da:

    if da[dd]==2:

        nev+=1

if nev%2==0:

    print((len(da)))

else:

    print((len(da)-1))

N=int(eval(input()))

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

da={}

for ll in la:

    if not ll in da:

        da[ll]=1

if (N-len(da))%2==0:

    print((len(da)))

else:

    print((len(da)-1))

N = int(eval(input()))
la = list(map(int, input().split()))
da = {}
for ll in la:
    if not ll in da:
        da[ll] = 1
    elif da[ll] == 1:
        da[ll] = 2
    else:
        da[ll] = 1
nev = 0
for dd in da:
    if da[dd] == 2:
        nev += 1
if nev % 2 == 0:
    print((len(da)))
else:
    print((len(da) - 1))

N = int(eval(input()))
la = list(map(int, input().split()))
da = {}
for ll in la:
    if not ll in da:
        da[ll] = 1
if (N - len(da)) % 2 == 0:
    print((len(da)))
else:
    print((len(da) - 1))

-    elif da[ll] == 1: -        da[ll] = 2 -    else: -        da[ll] = 1 -nev = 0 -for dd in da: -    if da[dd] == 2: -        nev += 1 -if nev % 2 == 0: +if (N - len(da)) % 2 == 0: