You are given an integer sequence of length N, a_1,a_2,...,a_N.  For each 1≤i≤N, you have three choices: add 1 to a_i, subtract 1 from a_i or do nothing.  After these operations, you select an integer X and count the number of i such that a_i=X.  Maximize this count by making optimal choices.
n=int(input())
a=list(map(int,input().split()))
mana=0
l=[]
for i in range(1,n+1):
    ans=0
    if abs(a[i-1]-1)==i or abs(a[i-1]+1==i) or a[i-1]==i:
        ans+=1
        mana=max(ans,mana)
        l.append(mana)
print(mana)
print(l)
N = int(input())
a = list(map(int,input().split()))

c = [0 for _ in range(10**5+3)]

for i in a:
    c[i-1] += 1
    c[i+1] += 1
    c[i] += 1
print(max(c))
