from collections import Counter



N = int(eval(input()))

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

ans = 0

l, r = 0, N



for K in range(10**5+1):

    if l == r:

        ans += 1

    l += d[K]

    r -= d[K]



print(ans)
N = int(eval(input()))

d = sorted(list(map(int, input().split())), reverse=True)



print((d[N//2-1] - d[N//2]))
from collections import Counter

N = int(eval(input()))
d = Counter(list(map(int, input().split())))
ans = 0
l, r = 0, N
for K in range(10**5 + 1):
    if l == r:
        ans += 1
    l += d[K]
    r -= d[K]
print(ans)

N = int(eval(input()))
d = sorted(list(map(int, input().split())), reverse=True)
print((d[N // 2 - 1] - d[N // 2]))

-from collections import Counter - -d = Counter(list(map(int, input().split()))) -ans = 0 -l, r = 0, N -for K in range(10**5 + 1): -    if l == r: -        ans += 1 -    l += d[K] -    r -= d[K] -print(ans) +d = sorted(list(map(int, input().split())), reverse=True) +print((d[N // 2 - 1] - d[N // 2]))