from bisect import bisect_left



N = int(eval(input()))

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

d.sort()



to_take = N // 2



cnt = 0

for x in range(d[0], d[-1] + 1):

    idx = bisect_left(d, x)

    # ABC用の問題数

    if idx == to_take:

        cnt += 1

print(cnt)

n = int(eval(input()))

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

d.sort()



print((d[n // 2] - d[n // 2 - 1]))

from bisect import bisect_left

N = int(eval(input()))
d = list(map(int, input().split()))
d.sort()
to_take = N // 2
cnt = 0
for x in range(d[0], d[-1] + 1):
    idx = bisect_left(d, x)
    # ABC用の問題数
    if idx == to_take:
        cnt += 1
print(cnt)

n = int(eval(input()))
d = list(map(int, input().split()))
d.sort()
print((d[n // 2] - d[n // 2 - 1]))

-from bisect import bisect_left - -N = int(eval(input())) +n = int(eval(input())) -to_take = N // 2 -cnt = 0 -for x in range(d[0], d[-1] + 1): -    idx = bisect_left(d, x) -    # ABC用の問題数 -    if idx == to_take: -        cnt += 1 -print(cnt) +print((d[n // 2] - d[n // 2 - 1]))