Buggy python submission (verdict: Runtime Error):
#ABC072-C
import collections
import itertools

n = int(input())
a = list(map(int,input().split()))
 
cnt = [0] * (n+2)


for i in a:
    cnt[i] += 1
    cnt[i+1] += 1
    cnt[i+2] += 1
    
    

    
        
print(max(cnt))


Fixed submission:
#ABC072-C
n = int(input())
a = list(map(int,input().split()))
 
cnt = [0] * 100002


for i in a:
    cnt[i] += 1
    cnt[i+1] += 1
    cnt[i+2] += 1
    
    

    
        
print(max(cnt))

Buggy python submission (verdict: Time Limit Exceeded):
#ABC072-C
import collections
import itertools

n = int(input())
a = list(map(int,input().split()))
 
cnt = [0] * 100000000


for i in a:
    cnt[i] += 1
    cnt[i+1] += 1
    cnt[i+2] += 1
    
    

    
        
print(max(cnt))


Fixed submission:
#ABC072-C
n = int(input())
a = list(map(int,input().split()))
 
cnt = [0] * 100002


for i in a:
    cnt[i] += 1
    cnt[i+1] += 1
    cnt[i+2] += 1
    
    

    
        
print(max(cnt))

Buggy python submission (verdict: Runtime Error):
#ABC072-C
import collections
import itertools

n = int(input())
a = list(map(int,input().split()))
 
cnt = [0] * 100000


for i in a:
    cnt[i] += 1
    cnt[i+1] += 1
    cnt[i+2] += 1
    
    

    
        
print(max(cnt))


Fixed submission:
#ABC072-C
n = int(input())
a = list(map(int,input().split()))
 
cnt = [0] * 100002


for i in a:
    cnt[i] += 1
    cnt[i+1] += 1
    cnt[i+2] += 1
    
    

    
        
print(max(cnt))

Buggy python submission (verdict: Runtime Error):
#ABC072-C
import collections
import itertools

n = int(input())
a = list(map(int,input().split()))
 
cnt = [0] * 100000
a.sort()

for i in range(a):
    cnt[i] += 1
    cnt[i+1] += 1
    cnt[i+2] += 2
    
    

    
        
print(max(cnt))


Fixed submission:
#ABC072-C
n = int(input())
a = list(map(int,input().split()))
 
cnt = [0] * 100002


for i in a:
    cnt[i] += 1
    cnt[i+1] += 1
    cnt[i+2] += 1
    
    

    
        
print(max(cnt))

Buggy python submission (verdict: Time Limit Exceeded):
#ABC072-C
import collections
import itertools

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

cnt = 0
a.sort()

for i in range(len(a)):
    tmp = a.count(a[i]-1) + a.count(a[i]) + a.count(a[i]+1)
    if tmp > cnt:
        cnt = tmp
        
print(cnt)


Fixed submission:
#ABC072-C
n = int(input())
a = list(map(int,input().split()))
 
cnt = [0] * 100002


for i in a:
    cnt[i] += 1
    cnt[i+1] += 1
    cnt[i+2] += 1
    
    

    
        
print(max(cnt))

Buggy python submission (verdict: Time Limit Exceeded):
#ABC072-C
import collections
import itertools

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

cnt = 0

for i in range(len(a)):
    tmp = a.count(a[i]-1) + a.count(a[i]) + a.count(a[i]+1)
    if tmp > cnt:
        cnt = tmp
        
print(cnt)


Fixed submission:
#ABC072-C
n = int(input())
a = list(map(int,input().split()))
 
cnt = [0] * 100002


for i in a:
    cnt[i] += 1
    cnt[i+1] += 1
    cnt[i+2] += 1
    
    

    
        
print(max(cnt))

Buggy python submission (verdict: Time Limit Exceeded):
#ABC072-C
import collections
import itertools

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

cnt = 0

for i in a:
    tmp = a.count(i-1) + a.count(i) + a.count(i+1)
    if tmp > cnt:
        cnt = tmp
        
print(cnt)


Fixed submission:
#ABC072-C
n = int(input())
a = list(map(int,input().split()))
 
cnt = [0] * 100002


for i in a:
    cnt[i] += 1
    cnt[i+1] += 1
    cnt[i+2] += 1
    
    

    
        
print(max(cnt))