Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

from decimal import Decimal
counter = 0
N = int(input())
lis = [0] * N
for i in range(0, N):
  s = input()
  if s.isdigit() == False:
    lis[i] = Decimal(s)
  else:
    lis[i] = int(s)
for i in range(0, N):
  for j in range(i+1, N):
    k = lis[i] * lis[j]
    b = k - int(k)
    if b == 0 or b == 0.0 or b == 0.00 or b == 0.000 or b == 0.0000 or b == 0.00000 or b == 0.000000 or b == 0.0000000 or b == 0.00000000:
      counter+= 1
print(counter)

### FIXED CODE ###

import sys
input = sys.stdin.readline
 
 
def divide(n):
    c1, c2 = 0, 0
    while (n%2 == 0):
        c1 += 1
        n //= 2
    while (n%5 == 0):
        c2 += 1
        n //= 5
    return (c1, c2)
    
 
def main():
    n = int(input())
    a = [None]*n
    for i in range(n):
        sub = input().replace("\n", "")
        if "." in sub:
            x, y = map(str, sub.split("."))
            s = int(x)*1000000000+10**(9-len(y))*int(y)
        else:
            s = int(sub)
            s *= 1000000000
        a[i] = divide(s)
 
    dp = [[0]*100 for _ in range(100)]
    for i in range(n):
        c1, c2 = a[i]
        dp[c1][c2] += 1
    
    for i in range(98, -1, -1):
        for j in range(98, -1, -1):
            dp[i][j] += dp[i+1][j]+dp[i][j+1]-dp[i+1][j+1]
 
    ans = 0
    for i in range(n):
        c1, c2 = a[i]
        if (c1 >= 9 and c2 >= 9):
            ans -= 1
        if c1 >= 18 and c2 >= 18:
            ans += dp[0][0]
            continue
        if c1 >= 18:
            ans += dp[0][18-c2]
            continue
        if c2 >= 18:
            ans += dp[18-c1][0]
            continue
        ans += dp[18-c1][18-c2]
        
    print(ans//2)
    
    
    
if __name__ == "__main__":
    main()
### BUGGY CODE ###

N = int(input())
A = list(map(int, input().split()))

answer = N
mark = 0
for i in range(N-1):
    #print('%d, %d, %d' % (i, mark, answer))
    if i < mark:
        answer += mark - i
        v = A[i]
        for x in range(i+1, mark+1):
            v += A[x]
        start_j = mark + 1
    else:
        v = A[i]
        start_j = i + 1
    for j in range(start_j, N):
        vx = v ^ A[j]
        vp = v + A[j]
        if vx == vp:
            answer += 1
            v = vx
            mark = j
        else:
            break
print(answer)


### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))

f = {}
right = 0
accum = A[0]
for left in range(N):
    if right < left:
        right = left
        accum = A[left]

    while(right < N-1):
        if accum & A[right+1] == 0:
            accum += A[right+1]
            right += 1
        else:
            break

    f[left] = right
    accum -= A[left]

answer = 0
for i in range(N):
    answer += f[i] - i + 1

print(answer)
### BUGGY CODE ###

N, M, S = map(int, input().split(" "))
adj = [ [] for _ in range(N) ] 
convert = []
cost_max = 0
for _ in range(M) :
    u, v, a, b = map(int, input().split(" "))
    adj[u-1].append( (v-1,a,b) )
    adj[v-1].append( (u-1,a,b) )
    cost_max = max(cost_max, a)

for _ in range(N) :
    c, d = map(int, input().split(" "))
    convert.append( (c, d) )  

import heapq 

limit = cost_max*N
S = min(S, limit)
h = [ (0, 0, S) ] 
ans = [  [-1]*(limit+1) for _ in range(N) ]

while h != [] :
    time_consumed, city, coin = heapq.heappop(h)
    if ans[city][coin] != -1:
        continue
    ans[city][coin] = time_consumed
            
    while coin <= limit :
        for v, a, b in adj[city] :
            if coin - a < 0 or ans[v][coin-a] != -1:
                continue
            heapq.heappush( h, (time_consumed+b, v, coin-a) )
        coin += convert[city][0]
        time_consumed += convert[city][1]

for i in range(1, N) :
    _min = float('inf')
    for j in range(limit+1) :
        if ans[i][j] == -1 : 
            continue
        _min = min(_min, ans[i][j])
    print(_min)

### FIXED CODE ###

N, M, S = map(int, input().split(" "))
adj = [ [] for _ in range(N) ] 
convert = []
for _ in range(M) :
    u, v, a, b = map(int, input().split(" "))
    adj[u-1].append( (v-1,a,b) )
    adj[v-1].append( (u-1,a,b) )

for _ in range(N) :
    c, d = map(int, input().split(" "))
    convert.append( (c, d) )  

import heapq 

limit = 2500
S = min(S, limit)
h = [ (0, 0, S) ] 
ans = [  [float('inf')]*(limit+1) for _ in range(N) ]

while h != [] :
    time_consumed, city, coin = heapq.heappop(h)
    if ans[city][coin] < time_consumed:
        continue
    ans[city][coin] = time_consumed
    
    if coin + convert[city][0] < limit and ans[city][coin + convert[city][0]] > time_consumed + convert[city][1] :
        ans[city][coin + convert[city][0]] = time_consumed + convert[city][1]
        heapq.heappush(h, (time_consumed + convert[city][1], city, coin+convert[city][0] ) )

    for v, a, b in adj[city] :
        if coin - a < 0 or ans[v][coin-a] <= time_consumed+b :
            continue
        ans[v][coin-a] = time_consumed+b
        heapq.heappush( h, (time_consumed+b, v, coin-a) )
    
for i in range(1, N) :
    print(min(ans[i]))
### BUGGY CODE ###

n = int(input())
a = list(map(int,input().split()))
ans = 1
for i in a:
    ans *= i
if ans > 1000000000000000000:
    ans = -1
print(ans)

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
ans = 1
if 0 in a:
    ans = 0
else:
    for i in a:
        ans *= i
        if ans > 1000000000000000000:
            ans = -1
            break
print(ans)
### BUGGY CODE ###

#!/usr/bin/env python3
def main():
    from bisect import bisect

    N = int(input())
    A = sorted([int(x) for x in input().split()])
    B = sorted([int(x) for x in input().split()])
    C = sorted([int(x) for x in input().split()])

    lst = [N - bisect(C, b) for b in B]
    ans = 0
    for a in A:
        ans += sum(lst[bisect(B, a):])
    print(ans)


if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
def main():
    from bisect import bisect

    N = int(input())
    A = sorted([int(x) for x in input().split()])
    B = sorted([int(x) for x in input().split()])
    C = sorted([int(x) for x in input().split()])

    lst = [N - bisect(C, b) for b in B]
    lst = lst[::-1]
    tmp_lst = [lst[0]]
    for i in lst[1:]:
        tmp_lst.append(i + tmp_lst[-1])
    tmp_lst = tmp_lst[::-1]

    ans = 0
    for a in A:
        res = bisect(B, a)
        ans += tmp_lst[res] if res < N else 0
    print(ans)


if __name__ == '__main__':
    main()
### BUGGY CODE ###

n,k=map(int,input().split())
p=list(map(int,input().split()))
for i in range(n):
    p[i]=(p[i]+1)/2
q=[]
for i in range(n-k+1):
    q.append(sum(p[i:k+i]))
print(max(q))


### FIXED CODE ###

n,k=map(int,input().split())
p=list(map(int,input().split()))
for i in range(n):
    p[i]=(p[i]+1)/2
q=[0]*(n-k+1)
q[0]=sum(p[0:k])
for i in range(1,n-k+1):
    q[i]=q[i-1]-p[i-1]+p[k+i-1]
print(max(q))
### BUGGY CODE ###

N, Q = map(int, input().split())
S = input()
A = []
B = [0]*Q
for n in range(N-1):
    if S[n:n+2] == "AC":
        A.append(n)
for n in range(Q):
    l, r = map(int, input().split())
    for m in range(len(A)):
        if A[m] >= l-1 and A[m] <= r-2:
            B[n] += 1
for n in range(Q):
    print(B[n])

### FIXED CODE ###

N, Q = map(int, input().split())
S = input()
A = [0]*(N-1)
B = [0]
C = []
for n in range(N-1):
    if S[n:n+2] == "AC":
        A[n] += 1
for n in range(N-1):
    B.append(B[n]+A[n])
for n in range(Q):
    l, r = map(int, input().split())
    C.append(B[r-1]-B[l-1])
for n in range(Q):
    print(C[n])
### BUGGY CODE ###

import sys
input = sys.stdin.readline


def main():
    N, K = [int(x) for x in input().split()]
    H = [int(x) for x in input().split()]

    dp = [0] * (N + 1)
    dp[2] = abs(H[0] - H[1])

    for i in range(3, N + 1):
        mi = float("inf")
        for j in range(i - 1, i - K - 1, -1):
            if j == 0:
                break
            mi = min(mi, dp[j] + abs(H[j - 1] - H[i - 1]))
        dp[i] = mi

    print(dp[N])




if __name__ == '__main__':
    main()



### FIXED CODE ###

import sys
input = sys.stdin.readline


def main():
    N, K = [int(x) for x in input().split()]
    H = [int(x) for x in input().split()]

    dp = [0] * (N + 1)
    dp[2] = abs(H[0] - H[1])

    for i in range(3, N + 1):
        mi = float("inf")
        for j in range(i - 1, i - K - 1, -1):
            if j == 0:
                break
            mi = min(mi, dp[j] + abs(H[j - 1] - H[i - 1]))
        dp[i] = mi

    print(dp[N])




if __name__ == '__main__':
    main()
### BUGGY CODE ###

from heapq import heappush, heappop

xs, ys, xt, yt = map(int, input().split())
N = int(input())
xyr = [list(map(int, input().split())) for i in range(N)]
graph = [[0] * (N+2) for i in range(N+2)]

def dist(x1, y1, x2, y2):
  return ((x1-x2)**2 + (y1-y2)**2)**0.5

graph[0][-1] = graph[-1][0] = dist(xs, ys, xt, yt)
for i, (xi, yi, ri) in enumerate(xyr, 1):
  d1 = max(0, dist(xs, ys, xi, yi) - ri)
  d2 = max(0, dist(xt, yt, xi, yi) - ri)
  graph[0][i] = graph[i][0] = d1
  graph[-1][i] = graph[i][-1] = d2
  for j, (xj, yj, rj) in enumerate(xyr, 1):
    dij = max(0, dist(xi, yi, xj, yj) - ri -rj)
    graph[i][j] = graph[j][i] = dij

INF = 10**15
d = [INF] * (N+2)
d[0] = 0
h = []
for i, di in enumerate(graph[0][1:], 1):
  heappush(h, [di, i])

while h:
  di, i = heappop(h)
  if d[i] < INF:
    continue
  d[i] = di
  if i == N+1:
    print(di)
    quit()
  for j, dj in enumerate(graph[i]):
    if j == i:
      continue
    if d[j] < INF:
      continue
    heappush(h, [d[i]+dj, j])

### FIXED CODE ###

from scipy.sparse import csr_matrix
from scipy.sparse.csgraph import dijkstra

xs, ys, xt, yt = map(int, input().split())
N = int(input())
xyr = [list(map(int, input().split())) for i in range(N)]

def dist(x1, y1, x2, y2):
  return ((x1-x2)**2 + (y1-y2)**2)**0.5

row = [0]
col = [1]
data = [dist(xs, ys, xt, yt)]
for i, (xi, yi, ri) in enumerate(xyr, 2):
  d1 = max(0, dist(xi, yi, xs, ys) - ri)
  d2 = max(0, dist(xi, yi, xt, yt) - ri)
  row.extend([0, 1])
  col.extend([i, i])
  data.extend([d1, d2])
  for j in range(i-1, N):
    xj, yj, rj = xyr[j]
    dij = max(0, dist(xi, yi, xj, yj) - ri - rj)
    row.append(i)
    col.append(j+2)
    data.append(dij)

graph = csr_matrix((data, (row, col)), shape=(N+2, N+2))
dist = dijkstra(graph, directed=False, indices=0)
print(dist[1])
### BUGGY CODE ###

n = int(input())
s = [input() for _ in [0]*n]
s = sorted(s, key=s.count)
ans = []
for i in set(s):
    if s.count(i) == s.count(s[-1]):
        ans += [i]
print('\n'.join(sorted(ans)))

### FIXED CODE ###

n = int(input())
s = [input() for i in range(n)]

d = {}
cnt = 0
for i in range(n):
	if s[i] in d: d[s[i]] += 1
	else: d[s[i]] = 1
	cnt = max(cnt, d[s[i]])

l = []
for i in range(n):
	if d[s[i]] == cnt:
		l.append(s[i])

l = list(set(l))
l.sort()
for i in range(len(l)):
	print(l[i])
### BUGGY CODE ###

n,m = map(int,input().split())
a = list(map(int,input().split()))
a.sort(reverse = True)
l = [0,2,5,5,4,5,6,3,7,6]

dp = [0]*(n+1)

for i in range(1,n+1):
    c = 0
    for j in range(m):
        if i >= l[a[j]]:
            c = max(c,dp[i-l[a[j]]]+1)
    dp[i] = c

ans = []
remain = dp[-1]
now = n
while now > 0 and remain > 0:
    for i in range(m):
        if now >= l[a[i]] and dp[now-l[a[i]]] == remain-1:
            if remain == 1:
                if now == l[a[i]]:
                    ans.append(a[i])
                    now = remain = 0
            else:
                if now >= l[a[i]] and dp[now-l[a[i]]] == remain-1:
                    ans.append(a[i])
                    remain -= 1
                    now -= l[a[i]]
                    break
            
print(*ans,sep="")

### FIXED CODE ###

n,m = map(int,input().split())
a = list(map(int,input().split()))
a.sort(reverse = True)
l = [0,2,5,5,4,5,6,3,7,6]

dp = [-1**10]*(n+1)
dp[0] = 0
for i in range(1,n+1):
    
    for j in range(m):
        if i >= l[a[j]] and dp[i] < dp[i-l[a[j]]]+1:
            dp[i] = dp[i-l[a[j]]]+1
            

ans = []
remain = dp[-1]
now = n
for i in a:
    x = l[i]
    while now -x >= 0 and dp[now] == dp[now-x]+1:
        ans.append(i)
        now -= x 
print(*ans,sep="")
### BUGGY CODE ###

# -*- coding: utf-8 -*-
"""
Created on Thu Sep 20 21:40:30 2018
ABC065D
@author: maezawa
i=0...n (0-origin)
"""
import heapq

n = int(input())
a = []
b = []
for i in range(n): # i is a name of the city (0-origin)
    xy = list(map(int, input().split()))
    a.append([xy[0],i])
    b.append([xy[1],i])

a.sort()
b.sort()
#print(a) 
#print(b)

# making adj list
adj = [[] for _ in range(n)]
for [x0, j0], [x1, j1]  in zip(a, a[1:]):
    adj[j0].append([x1-x0, j1])
    adj[j1].append([x1-x0, j0])
for [y0, j0], [y1, j1] in zip(b, b[1:]):
    adj[j0].append([y1-y0, j1])
    adj[j1].append([y1-y0, j0])

#print(adj)
    
# Prim's algorithm
d = [10**10]*n
visited = [False]*n
h = []
s = 0
heapq.heappush(h, [0, s])
cnt = 0
while h:
    cost, node = heapq.heappop(h)
    if visited[node] != True and cost < d[node]:
    #if visited[node] != True:        
        d[node] = cost
        visited[node] = True
        cnt += 1
        if cnt == n:
            break
        for cost1, node1 in adj[node]:
            if visited[node1] == True:
                continue
            heapq.heappush(h, [cost1, node1])
            
#print(d)
print(sum(d))
        


### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
Created on Thu Sep 20 21:40:30 2018
ABC065D
@author: maezawa
i=0...n (0-origin)
"""
import heapq
import sys
input = sys.stdin.readline

n = int(input())
a = [[] for _ in range(n)]
b = [[] for _ in range(n)]
for i in range(n): # i is a name of the city (0-origin)
    xy = list(map(int, input().split()))
    a[i]=[xy[0],i]
    b[i]=[xy[1],i]

a.sort()
b.sort()
#print(a) 
#print(b)

# making adj list
adj = [[] for _ in range(n)]
for [x0, j0], [x1, j1]  in zip(a, a[1:]):
    adj[j0].append([x1-x0, j1])
    adj[j1].append([x1-x0, j0])
for [y0, j0], [y1, j1] in zip(b, b[1:]):
    adj[j0].append([y1-y0, j1])
    adj[j1].append([y1-y0, j0])

#print(adj)
    
# Prim's algorithm
#d = [10**10]*n
visited = [False]*n
h = []
s = 0
heapq.heappush(h, [0, s])
cnt = 0
totalcost = 0 
while h:
    cost, node = heapq.heappop(h)
    #if visited[node] != True and cost < d[node]:
    if visited[node] != True:        
        #d[node] = cost
        visited[node] = True
        totalcost += cost
        cnt += 1
        if cnt == n:
            break
        for edge in adj[node]:
            if visited[edge[1]]:
                continue
            heapq.heappush(h, edge)
            
#print(d)
print(totalcost)
### BUGGY CODE ###

import itertools
N = int(input())
L = list(map(int, input().split()))
L.sort()
answer = 0

for i in itertools.combinations(L, 3):
    # print(i)
    if i[2] < i[0] + i[1]:
        answer += 1
print(answer)

### FIXED CODE ###

import itertools
import heapq
from bisect import bisect_left


def heapsort(iterable):
    h = []
    for value in iterable:
        heapq.heappush(h, value)
    return [heapq.heappop(h) for i in range(len(h))]

N = int(input())
L = list(map(int, input().split()))
L.sort()
# L_sort = heapsort(L)
# print (L)
answer = 0
for i, a in enumerate(L[0:N-2]):
    for j, b in enumerate(L[i+1:N-1]):
        index = bisect_left(L, a+b)
        answer += max(index - (j+i+1) -1, 0)
        # print(L, a+b, index, j+i+1, answer)
print(answer)
### BUGGY CODE ###

T = list(input())
P = list(input())
for i in range(len(T)):
    try:
        if P[0] == T[i]:
            for j in range(len(P)):
                if P[j] == T[i + j]:
                    pass
                else: break
            else: print(i)
    except:pass

### FIXED CODE ###

T = input()
P = input()
lenp = len(P)
for i in range(len(T)-len(P)+1):
    t = T[i : i+lenp]
    if t == P:
        print(i)
### BUGGY CODE ###

#!/usr/bin/python3
# -*- coding:utf-8 -*-

import numpy

def main():
  n = input().strip()[::-1]
  dp = numpy.zeros((len(n), 2), dtype=numpy.int)
  dp[0][0] = int(n[0])
  dp[0][1] = 10 - int(n[0])
  for i, d in enumerate(map(int, n[1:]), 1):
    dp[i][0] = min(dp[i-1][0] + d,      dp[i-1][1] + 1 + d)
    dp[i][1] = min(dp[i-1][0] + 10 - d, dp[i-1][1] + 10 - (d + 1))
  print(min(dp[-1][0], dp[-1][1]+1))  

if __name__=='__main__':
  main()



### FIXED CODE ###

#!/usr/bin/python3
# -*- coding:utf-8 -*-

def main():
  n = input().strip()[::-1]
  dp = [[0, 0] for _ in range(len(n))]
  dp[0][0] = int(n[0])
  dp[0][1] = 10 - int(n[0])
  for i, d in enumerate(map(int, n[1:]), 1):
    dp[i][0] = min(dp[i-1][0] + d,      dp[i-1][1] + 1 + d)
    dp[i][1] = min(dp[i-1][0] + 10 - d, dp[i-1][1] + 10 - (d + 1))
  print(min(dp[-1][0], dp[-1][1]+1))  

if __name__=='__main__':
  main()
### BUGGY CODE ###

def getinputdata():

    # 配列初期化
    array_result = []
    
    data = input()
    
    array_result.append(data.split(" "))

    flg = 1

    try:

        while flg:

            data = input()

            if(data != ""):
                
                array_result.append(data.split(" "))

            else:

                flg = 0
    finally:

        return array_result

arr_data = getinputdata()

n = int(arr_data[0][0])
k = int(arr_data[0][1])

arr = [int(x) for x in arr_data[1]]
mindata = min(arr)
arr_replace = [mindata for x in range(k)]

cnt = 0
idx=arr.index([x for x in arr if x !=mindata][0])

while not (all(x == mindata for x in arr)):
    
    if not(all(x == mindata for x in arr[idx:idx + k])):
        cnt += 1
        arr[idx:idx + k] = arr_replace
    
    if not(all(x == mindata for x in arr[idx + k-1:idx + k-1 + k])):
        cnt += 1
        arr[idx + k-1:idx + k-1 + k] = arr_replace
    
#    idx += k-1 + k-1
#    print(arr[idx+1:])
#    print([x for x in arr[idx+1:] if x !=mindata])
#    print(len([x for x in arr[idx+1:] if x !=mindata]))
    
#    print(cnt)
    if len([x for x in arr[idx+1:] if x !=mindata])!=0:
        
        idx=arr.index([x for x in arr[idx+1:] if x !=mindata][0])-1
        
    else:
        break
    
    
print(cnt) 
    
    
    


### FIXED CODE ###

def getinputdata():

    # 配列初期化
    array_result = []
    
    data = input()
    
    array_result.append(data.split(" "))

    flg = 1

    try:

        while flg:

            data = input()

            if(data != ""):
                
                array_result.append(data.split(" "))

            else:

                flg = 0
    finally:

        return array_result

arr_data = getinputdata()

n = int(arr_data[0][0])
k = int(arr_data[0][1])

arr = [int(x) for x in arr_data[1]]

cnt=1
if n <= k:
    
    print(cnt)
    
else:
    
    chkflg = True
    
    while chkflg:
        
        cnt+=1

        s = k + 1 + (k-1) * (cnt-2)
        e = k * 2-1 + (k-1) * (cnt-2)
        
        if s<=n<=e:
            
            chkflg=False
            
            
    print(cnt)
### BUGGY CODE ###

n, w = map(int, input().split())
nums = []
for _ in range(n):
  nums.append(list(map(int, input().split())))

dp = [[0 for _ in range(w+1)] for _ in range(n+1)]

for i in range(1, n+1):
  for j in range(1, w+1):
    if j < nums[i-1][0]:
      dp[i][j] = dp[i-1][j]
    else:
      dp[i][j] = max(dp[i-1][j], dp[i-1][j-nums[i-1][0]] + nums[i-1][1])
print(dp[-1][-1])

### FIXED CODE ###

n, w = map(int, input().split())
nums = []
for _ in range(n):
  nums.append(list(map(int, input().split())))
  
total_v = sum(nums[i][1] for i in range(n))

dp = [[float('inf') for _ in range(total_v+1)] for _ in range(n+1)]
dp[0][0] = 0

for i in range(1, n+1):
  for j in range(total_v+1):
    if j < nums[i-1][1]:
      dp[i][j] = dp[i-1][j]
    else:
      dp[i][j] = min(dp[i-1][j], dp[i-1][j-nums[i-1][1]] + nums[i-1][0])
for i in range(total_v, -1, -1):
  if dp[n][i] != float('inf') and dp[n][i] <= w:
    print(i)
    break
### BUGGY CODE ###

N,Ma,Mb=list(map(int,input().split()))

mix=set([(0,0,0)])
rate=Ma/Mb
ans=10**9
for i in range(N):
    a,b,c=list(map(int,input().split()))
    tmp=mix.copy()
    for x in tmp:
        d=x[0]+a
        e=x[1]+b
        f=x[2]+c
        mix.add((d, e, f))
        if d/e==Ma/Mb and f<ans:
            ans=f
if ans==10**9:
    ans=-1
print(ans)

### FIXED CODE ###

N,Ma,Mb=list(map(int,input().split()))

mix=set([(0,0)])
ans=10**9
cost={(0,0):0}
for i in range(N):
    a,b,c=list(map(int,input().split()))
    tmp=mix.copy()
    tmp2=cost.copy()
    for x in tmp:
        d=x[0]+a
        e=x[1]+b
        f=min(tmp2.get((d,e),10**9),tmp2[x]+c)
        cost[(d,e)]=f
        mix.add((d, e))
        if d*Mb==e*Ma and f<ans:
            ans=f
"""
print(cost)
print(mix)
"""
if ans==10**9:
    ans=-1
print(ans)
### BUGGY CODE ###

from collections import defaultdict
def main():
    N = int(input())
    A = [int(a) for a in input().split()]
    number = sorted(set(A))
    c = defaultdict(int)
    for k in number:
        c[k] = A.count(k-1) + A.count(k) + A.count(k+1)
    ma = 0
    for k, v in c.items():
        if v > ma:
            ma = v
    print(ma)

if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    N = int(input())
    A = [int(a) for a in input().split()]
    C = [0]*10**5
    for i in range(N):
        C[A[i]] += 1
    ma = 0
    for i in range(1, len(C)-1):
        count = C[i-1] + C[i] + C[i+1]
        if count > ma:
            ma = count    
    print(ma)
if __name__ == "__main__":
    main()
### BUGGY CODE ###

from heapq import *
import sys
from collections import *
from itertools import *
from decimal import *
import copy
from bisect import *
import math
sys.setrecursionlimit(4100000)
def gcd(a,b):
    if(a%b==0):return(b)
    return (gcd(b,a%b))
input=lambda :sys.stdin.readline().rstrip()
N,S=map(int,input().split())
A=list(map(int,input().split()))
mod=998244353


dp=[defaultdict(int) for n in range(3001)]
for n in range(N):
    a=A[n]
    for s in range(0,S+1)[::-1]:
        if s+a<=S:
            for h in dp[s]:
                dp[s+a][h+1]+=dp[s][h]
    dp[a][1]+=1
c=0
for a in dp[S]:
    c+=pow(2,N-a,mod)*dp[S][a]
    c%=mod
print(c)


### FIXED CODE ###

from heapq import *
import sys
from collections import *
from itertools import *
from decimal import *
import copy
from bisect import *
import math
sys.setrecursionlimit(4100000)
def gcd(a,b):
    if(a%b==0):return(b)
    return (gcd(b,a%b))
input=lambda :sys.stdin.readline().rstrip()
N,S=map(int,input().split())
A=list(map(int,input().split()))
mod=998244353

gyaku=pow(2,mod-2,mod)
N2=pow(2,N-1,mod)
dp=[[0,0] for n in range(3001)]
for n in range(N):
    a=A[n]
    for s in range(0,S+1)[::-1]:
        if s+a<=S:
            dp[s+a][1]+=dp[s][1]*gyaku%mod
            dp[s+a][1]%=mod
    dp[a][1]+=N2

print(dp[S][1])
#print(c)
### BUGGY CODE ###

#!/usr/bin/env python
# coding: utf-8

# In[78]:


N,Q=map(int,input().split())
S=input()
lr=[list(map(int,input().split())) for l in range(Q)]
ct=0
l=list()
import re
i = 0
pAC=re.compile("AC")
while i >= 0:
    m = pAC.search(S, i)
    if m:
        l.append(m.start()+1)
        #l.append(m.end())
        i = m.start() + 1
    else:
        break
#print(l)
for i in range(Q):
    print(sum(x >= lr[i][0] and x<lr[i][1] for x in l))


# In[ ]:






### FIXED CODE ###

#!/usr/bin/env python
# coding: utf-8

# In[4]:


N,Q=map(int,input().split())
S=input()
lr=[list(map(int,input().split())) for l in range(Q)]
ct=0
l=[0]*(N+1)
for i in range(0,len(S)-1):
    if S[i]=='A' and S[i+1]=='C':
        l[i+1]=1+l[i]
    else:
        l[i+1]=l[i]
for i in range(Q):
    print(l[lr[i][1]-1]-l[lr[i][0]-1])


# In[ ]:
### BUGGY CODE ###

#16D8103010K Ko Okasaki
#ALDS_4_C

from collections import deque

n=int(input())
S=deque()
A=deque()

for i in range(n):
	cnt=0
	str=input().split()
	if str[0][0]=="i":
		S.append(str[1])
	else:
		for i in range(len(S)):
			if S[i]==str[1]:
				cnt+=1
				break
		
		if cnt==1:
			A.append("yes")
		else:
			A.append("no")

for i in range(len(A)):
	print(A[i])


### FIXED CODE ###

n=int(input())
dict={}
for i in range(n):
    str=input()
    if str[0]=="i":
        dict.update({str[7:]:1})
    else:
        if str[5:] in dict:
            print("yes")
        else:
            print("no")