N = int(eval(input()))

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

m = {}

eat = 1

for a in A:

  if a in m:

    eat += 1

  else:

    m[a] = 1

print((N - 2 * (eat // 2)))
N = int(eval(input()))

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

d = {}

for a in A:

    d[a] = 1

print((len(d) - (0 if len(d) % 2 else 1)))
N = int(eval(input()))
A = list(map(int, input().split()))
m = {}
eat = 1
for a in A:
    if a in m:
        eat += 1
    else:
        m[a] = 1
print((N - 2 * (eat // 2)))

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

-m = {} -eat = 1 +d = {} -    if a in m: -        eat += 1 -    else: -        m[a] = 1 -print((N - 2 * (eat // 2))) +    d[a] = 1 +print((len(d) - (0 if len(d) % 2 else 1)))