import collections



n = int(eval(input()))

A = [int(i) for i in input().split()]

B = [i+1 for i in A]

C = [i-1 for i in A]



print((collections.Counter(A+B+C).most_common(1)[0][1]))

n = int(eval(input()))

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

f = [0 for i in range(10**5 + 10)]

for i in a:

    f[i] += 1

    f[i + 1] += 1

    f[i - 1] += 1



print((max(f)))

import collections

n = int(eval(input()))
A = [int(i) for i in input().split()]
B = [i + 1 for i in A]
C = [i - 1 for i in A]
print((collections.Counter(A + B + C).most_common(1)[0][1]))

n = int(eval(input()))
a = list(map(int, input().split()))
f = [0 for i in range(10**5 + 10)]
for i in a:
    f[i] += 1
    f[i + 1] += 1
    f[i - 1] += 1
print((max(f)))

-import collections - -A = [int(i) for i in input().split()] -B = [i + 1 for i in A] -C = [i - 1 for i in A] -print((collections.Counter(A + B + C).most_common(1)[0][1])) +a = list(map(int, input().split())) +f = [0 for i in range(10**5 + 10)] +for i in a: +    f[i] += 1 +    f[i + 1] += 1 +    f[i - 1] += 1 +print((max(f)))