Harryxun/stf_run huggingface dataset:
[N, K] = list(map(int, input().split()))
all_A =[]
A_ = []
for i in range(1, N + 1):
    all_A.append(i)
for j in range(K):
    d = int(input())
    A = list(map(int, input().split()))
    A_ = A_.append(A)
all_A = set(all_A) ^ set(A_)
print(len(all_A))

### FIXED CODE ###

[N, K] = list(map(int, input().split()))
all_A =[]
AB = []
for i in range(1, N + 1):
    all_A.append(i)
for j in range(K):
    d = int(input())
    A = list(map(int, input().split()))
    AB = AB + A
last_A = set(all_A) ^ set(AB)
print(len(last_A))
a = int(input())

int ans = a+a*2+a*3

print(ans)

### FIXED CODE ###

a = int(input())

ans = a+a*a+a*a*a

print(ans)
s  = input()
a = s[:len(s)/2 -1]
b = s[len(s)+3/2-1:]
flag = 0
if s == s[::-1]:
    if a == a[::-1]:
        if b == b[::-1]:
            flag = 1

if flag:
    print('Yes')
else:
    print('No')

### FIXED CODE ###


s  = input()
a = s[:int(len(s)/2)]
b = s[:-int(len(s)/2 + 1)]
flag = 0
if s == s[::-1]:
    if a == a[::-1]:
        if b == b[::-1]:
            flag = 1

if flag:
    print('Yes')
else:
    print('No')
import math
import heapq

N, M = map(int, input().split(" "))
A = [-int(_) for _ in input().split(" ")]

for i in range(M):
    print(A)
    heapq.heapify(A)
    heapq.heappush(A, -(-heapq.heappop(A)// 2))

print(-sum(A))

### FIXED CODE ###

import heapq

N, M = map(int, input().split(" "))
A = [-int(_) for _ in input().split(" ")]

heapq.heapify(A)

for i in range(M):
    heapq.heappush(A, -(-heapq.heappop(A)// 2))
    
print(-sum(A))
n = int(input())
a = list(map(int, input().split()))

acc = [0 for i in range(n+1)]
for i in range(n):
    acc[i+1] = a[i] + acc[i]

ans = [0 for i in range(n+1)]
for i in range(n+1):
    ans[acc[i]] += 1

cnt = 0
for i in range(len(a)+1):
    cnt += ans[i]*(ans[i]-1)//2

print(cnt)

### FIXED CODE ###

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

acc = [0 for i in range(n+1)]
for i in range(n):
    acc[i+1] = a[i] + acc[i]

ans = {}
for x in acc:
    ans.setdefault(x, 0)
    ans[x] += 1
cnt = 0
for i in ans:
    cnt += ans[i]*(ans[i]-1)//2

print(cnt)
n=int(input())
a=list(map(int,input().split()))
MOD=1000000007
hats=[0,0,0]
ans=1
for i in range(n):
    ai=a[i]
    ans=((ans%MOD)*(hats.count(ai)%MOD))%MOD
    hats[hats.index(a[i])]+=1
print(ans)


### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
MOD=1000000007
hats=[0,0,0]
ans=1
for i in range(n):
    ai=a[i]
    ans=((ans%MOD)*hats.count(ai))%MOD
    if(ans==0):
        break
    hats[hats.index(ai)]+=1
#    print(ai,ans,hats)
print(ans%MOD)
# 配るDP
N, A = map(int, input().split())
X = list(map(int, input().split()))

dp = [[[0 for _ in range(2500+10)] for __ in range(N+1)] for ___ in range(N+1)]

dp[0][0][0] = 1

for i in range(N):
    for j in range(N):
        for k in range(2500+1):
            dp[i+1][j][k] += dp[i][j][k]
            dp[i+1][j+1][k+X[i]] += dp[i][j][k]

ans = 0
for n in range(1, N+1):
    ans += dp[N][n][n*A]

print(ans)


### FIXED CODE ###

# 配るDP
N, A = map(int, input().split())
X = list(map(int, input().split()))

dp = [[[0 for _ in range(3010)] for __ in range(N+1)] for ___ in range(N+1)]

dp[0][0][0] = 1

for i in range(N):
    for j in range(N):
        for k in range(2500+1):
            if dp[i][j][k]:
                dp[i+1][j][k] += dp[i][j][k]
                dp[i+1][j+1][k+X[i]] += dp[i][j][k]

ans = 0
for n in range(1, N+1):
    ans += dp[N][n][n*A]

print(ans)
while True:
 a =input()
 op =raw_input()
 b =input()
 if(op=='+'):
  print a+b
 elif(op=='-'):
  print a-b
 elif(op=='*'):
  print a*b
 elif(op=='/'):
  print a/b
 else:
  break

### FIXED CODE ###

while True:
 a,op,b = map(str,raw_input().split())
 a=int(a)
 b=int(b)

 if(op=='?'):
  break
 if(op=='+'):
  print a+b
 elif(op=='-'):
  print a-b
 elif(op=='*'):
  print a*b
 elif(op=='/'):
  print a/b
while 1:
    H,W = map(int,input().split())
    if H == 0 and W == 0:
        break
    print ("#") * W
    for i in range(H-2):
        print ("#" + "." * (W-2) + "#")
    print ("#") * W
    print ("")

### FIXED CODE ###

while 1:
    H,W = map(int,input().split())
    if H == 0 and W == 0:
        break
    print ("#"* W)
    for i in range(H-2):
        print ("#" + "." * (W-2) + "#")
    print ("#"* W)
    print ("")
n=[input() for _ in range(int(input()))];if len(set(n))!=len(n): print('No');exit()
print('NYoe s'[all([1 if n[i-1][-1]==n[i][0] else 0 for i in range(1,len(n))])::2])

### FIXED CODE ###

import sys
N = int(input())
W = [input() for _ in range(N)]
if len(set(W)) == len(W):
  for i in range(1, len(W)):
    if W[i-1][-1] != W[i][0]:
      print('No')
      sys.exit()
else:
  print('No')
  sys.exit()
print('Yes')
s=input()
sento=0
matubi
for i in range(s):
  if s[i] == "A":
    sento=i
    break
for i in range(s):
  if s[i] == "Z" and i > sento:
    matubi=i
    break
print(s[sento+1:matubi+1])

### FIXED CODE ###

s=input()
sento=2000000
matubi=0

for i in range(len(s)):
  if s[i] == "A":
    sento=min(i,sento)
for i in range(len(s)):
  if s[i] == "Z" and i > sento:
    matubi=max(i,matubi)
print(matubi-sento+1)
A = input()
if A = 'a':
  print('b')
elif A = 'b':
  print('c')
elif A = 'c':
  print('d')
elif A = 'd':
  print('e')
elif A = 'e':
  print('f')
elif A = 'f':
  print('g')
elif A = 'g':
  print('h')
elif A = 'h':
  print('i')
elif A = 'i':
  print('j')
elif A = 'j':
  print('k')
elif A = 'k':
  print('l')
elif A = 'l':
  print('m')
elif A = 'm':
  print('n')
elif A = 'n':
  print('o')
elif A = 'o':
  print('p')
elif A = 'p':
  print('q')
elif A = 'q':
  print('r')
elif A = 'r':
  print('s')
elif A = 's':
  print('t')
elif A = 't':
  print('u')
elif A = 'u':
  print('v')
elif A = 'v':
  print('w')
elif A = 'w':
  print('x')
elif A = 'x':
  print('y')
else:
  print('z')



### FIXED CODE ###

A = str(input(''))
if A == 'a':
  print('b')
elif A == 'b':
  print('c')
elif A == 'c':
  print('d')
elif A == 'd':
  print('e')
elif A == 'e':
  print('f')
elif A == 'f':
  print('g')
elif A == 'g':
  print('h')
elif A == 'h':
  print('i')
elif A == 'i':
  print('j')
elif A == 'j':
  print('k')
elif A == 'k':
  print('l')
elif A == 'l':
  print('m')
elif A == 'm':
  print('n')
elif A == 'n':
  print('o')
elif A == 'o':
  print('p')
elif A == 'p':
  print('q')
elif A == 'q':
  print('r')
elif A == 'r':
  print('s')
elif A == 's':
  print('t')
elif A == 't':
  print('u')
elif A == 'u':
  print('v')
elif A == 'v':
  print('w')
elif A == 'w':
  print('x')
elif A == 'x':
  print('y')
else:
  print('z')
print('ABC'if x=int(input())<1200else'ARC')

### FIXED CODE ###

print('ABC'if int(input())<1200else'ARC')
n=int(input())
list=filter(lambda x:x%2==1,range(1,n+1))
print(len(list))


### FIXED CODE ###

n=int(input())
if n<10:
  print(n)
elif n<100:
  print(9)
elif n<1000:
  print(n-90)
elif n<10000:
  print(909)
elif n<100000:
  print(n-9999+909)
else:
  print(90909)
def main():
    import sys
    input = sys.stdin.readline
    
    a,b = map(int,input().split())

    def make_two_divisors(a,b):
        lower_divisors,upper_divisors = [],[]
        prime_li = [True]*(max(a,b)+1)
        i = 1
        while i*i<=max(a,b):
            if prime_li[i]:
                if a%i==0 and b%i==0:
                    lower_divisors.append(i)
                    #if i != max(a,b)//i and a%(max(a,b)//i)==0 and b%(max(a,b)//i)==0:
                    #    upper_divisors.append(b//i)
                    if i!=1:
                        for j in range(i+i,max(a,b)+1,i):
                            prime_li[j]=False 
            i+=1
        return lower_divisors + upper_divisors[::-1]
    print(len(make_two_divisors(a,b)))

if __name__=='__main__':
    main()

### FIXED CODE ###

def main():
    import sys
    input = sys.stdin.readline
    
    a,b = map(int,input().split())

    #gcd(a,b)の素因数分解
    import math
    gcd = math.gcd(a,b)

    p = []
    for i in range(2,int(math.sqrt(gcd))+1):
        while gcd % i == 0:
            gcd /= i
            p.append(i)
            
    p.append(int(gcd))
    p.append(1)
    print(len(list(set(p))))

if __name__=='__main__':
    main()
S = list(input())
l = [chr(i) for i in range(65, 65+26)]

flag = True
if S[0] != 'A':
    flag = False
elif S[1] in l:
    flag = False
elif S[len(S)] in l:
    flag = False
elif not 'C' in S[2:len(S) - 2]:
    flag = False
count = 0
for i in range(2, len(S) - 1):
    if flag == False:
        break
    if S[i] in l:
        count += 1
    if count > 1:
        flag = False
if count < 1:
    flag = False
if flag:
    print('AC')
else:
    print('WA')

### FIXED CODE ###

S = list(input())
l = [chr(i) for i in range(65, 65+26)]

flag = True
count = 0
for i in range(len(S)):
    if i == 0:
        if S[i] != 'A':
            flag = False
            break
    if i == 1:
        if S[i] in l:
            flag = False
            break
    if 2 <= i <= len(S) - 2:
        if S[i] == 'C':
            count += 1
        elif S[i] in l:
            flag = False
            break
    if i == len(S) - 1:
        if S[i] in l:
            flag = False
            break
if not count == 1:
    flag = False

if flag:
    print('AC')
else:
    print('WA')
def main():
  a = []
  n = int(input())
  for x in range(1, n+1):
    for y in range(1, n+1):
      z = n - (x+y)
      if z <= 0:
        continue
      a.append(x*y*z)
  print(max(a))
          
  
def count_section_by_zero(data):
  count = 0
  flg = False
  start = 0
  for i, d in enumerate(data):
    if flg is False and d != 0:
      count += 1
      flg = True
      
    if d == 0:
      flg = False
  return count

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def input_list():
  return list(map(int, input().split()))

def input_list_str():
  return map(str, input().split())

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

def gcd(*numbers):
    return reduce(fractions.gcd, numbers)

def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)

# 2で割り切れる回数
def divide_two(arg):
  c = 0
  while True:
    if c >= 2:
      break
    if arg % 2 != 0:
      break
    arg //= 2
    c += 1
  return c

# 素因数分解
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

import math
import fractions
import collections
from functools import reduce
main()

### FIXED CODE ###

def main():
  a = []
  n = int(input())
  print((n/3)**3)

  
def count_section_by_zero(data):
  count = 0
  flg = False
  start = 0
  for i, d in enumerate(data):
    if flg is False and d != 0:
      count += 1
      flg = True
      
    if d == 0:
      flg = False
  return count

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def input_list():
  return list(map(int, input().split()))

def input_list_str():
  return map(str, input().split())

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

def gcd(*numbers):
    return reduce(fractions.gcd, numbers)

def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)

# 2で割り切れる回数
def divide_two(arg):
  c = 0
  while True:
    if c >= 2:
      break
    if arg % 2 != 0:
      break
    arg //= 2
    c += 1
  return c

# 素因数分解
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

import math
import fractions
import collections
from functools import reduce
main()
def summation(n):
    if n == 1:
        return 1
    else:
        return n + summation(n-1)


def main():
    a,b = map(int, input().split())
    
    n_plus1 = b-a
    
    ans = summation(n_plus1) - b
    
    print(ans)

    
if __name__ == "__main__":
    main()

### FIXED CODE ###

def summation(n):
    ans = 0
    for i in range(n+1):
        ans += i
        
    return ans


def main():
    a,b = map(int, input().split())
    
    n_plus1 = b-a
    
    ans = summation(n_plus1) - b
    
    print(ans)
    
    return 0

    
if __name__ == "__main__":
    main()
from math import gcd

def seachPrimeNum(N):
  max = int(N**0.5)
  seachList = [i for i in range(2,N+1)]
  primeNum = list(range(N+1))
  while seachList[0] <= max:
    tmp = seachList[0]
    tmp2 = list(seachList)
    for i in tmp2:
      if i%tmp == 0:
          primeNum[i]=tmp
          seachList.remove(i)
  return primeNum

def prime_factorize(n, f):
    a = []
    while n % f == 0:
        a.append(f)
        n //= f
    
    if f == 2:
      f=3
    else:
      f+=2
      
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
  
n = int(input())
a = list(map(int, input().split()))
d = seachPrimeNum(max(a))
dic = {}
g = a[0]

### FIXED CODE ###

from math import gcd
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return set(a)
  
n = int(input())
a = list(map(int, input().split()))
dic = {}
g = a[0]
flg = True
for i in range(n):
  g = gcd(g, a[i])
  if flg:
    tmp = prime_factorize(a[i])
    for j in tmp:
      if j in dic:
        flg = False
      else:
        dic[j]=1
        
if flg:
  print("pairwise coprime")
elif g == 1:
  print("setwise coprime")
else:
  print("not coprime")
a,b=map(int,input().split())
c=input()
s=[]
for i in range(N):
    s.append(input())
s.sort()
print(*s,sep="")

### FIXED CODE ###

n,l=map(int,input().split())
s=sorted([input() for i in range(n)])
print(*s,sep="")
a, b, c = (int, input().split())
print(c, a, b)

### FIXED CODE ###

a, b, c = map(int, input().split())
print(c, a, b)
k = input()
w= input()
l = len(str)
	if l <= k:
  print(str)
  	else:
    print(w[:k])


### FIXED CODE ###

k = int(input())
s = input()
if int(len(s)) <= k:
  	print(str(s))
else:
  	print(((str(s))[0:k]) + "...")
a, b = map(int, input().split)
if a <= b:
    print(a)
else:
    print(a-1)

### FIXED CODE ###

a, b = map(int, input().split())
if a <= b:
    print(a)
else:
    print(a-1)
import functools, sys

x, y = map(int, input().split())

mod = 10 ** 9 + 7

def modpow(x, y):
    z = 1
    while y > 0:
        if y % 2 == 0:
            x = (x * x) % mod
            y //= 2
        else:
            z = (z * x) % mod
            y -= 1
    return z

def modinv(x):
    return modpow(x, mod - 2)

def c(n, r):
    if n == r or r == 0:
        return 1

    fct = [None] * (n + 1)
    fct[0] = 1
    for i in range(1, n + 1):
        fct[i] = fct[i - 1] * i % mod
    return fct[n] * (modinv(fct[n - r]) * modinv(fct[r]) % mod) % mod

def f():
    if (2 * y - x) % 3 != 0:
        return 0
    a = (2 * y - x) // 3
    b = y - 2 * a
    if b < 0:
        return 0
    
    return c(a + b, a)

print(f())

### FIXED CODE ###

import functools, sys

x, y = map(int, input().split())

mod = 10 ** 9 + 7

def modpow(x, y):
    z = 1
    while y > 0:
        if y % 2 == 0:
            x = (x * x) % mod
            y //= 2
        else:
            z = (z * x) % mod
            y -= 1
    return z

def modinv(x):
    return modpow(x, mod - 2)

def c(n, r):
    if n == r or r == 0:
        return 1

    fct = [None] * (n + 1)
    fct[0] = 1
    for i in range(1, n + 1):
        fct[i] = fct[i - 1] * i % mod
    return fct[n] * (modinv(fct[n - r]) * modinv(fct[r]) % mod) % mod

def f():
    if 2 * y - x < 0 or (2 * y - x) % 3 != 0:
        return 0
    a = (2 * y - x) // 3
    b = y - 2 * a
    if b < 0:
        return 0
    
    return c(a + b, a)

print(f())
from math import gcd
 
K = int(input());
gcd = 0;

for a in range(1,K+1):
  for b in range(1,K+1):
    for c in range(1,K+1):
      gcd += gcd(gcd(a,b),c);

print(gcd)


### FIXED CODE ###

from math import gcd
 
K = int(input());
sum = 0;

for a in range(1,K+1):
  for b in range(1,K+1):
    for c in range(1,K+1):
      sum += gcd(gcd(a,b),c);

print(sum)
import cmath
import numpy as np
import sys

INF=10**18
MOD=10**9+7
MAX=10**5+7

def main():
    N=int(input())
    dp=[0, 0, 0]
    for _ in range(N):
        a,b,c=map(int, input().split())
        ndp=[0, 0, 0]
        ndp[0]=max(dp[1], dp[2])+a
        ndp[1]=max(dp[2], dp[0])+b
        ndp[2]=max(dp[0], dp[1])+c
        dp=ndp
    print(max(dp))
        
if __name__=='__main__':
    main()


### FIXED CODE ###

import cmath
import numpy as np
import sys

INF=10**18
MOD=10**9+7
MAX=10**5+7

def main():
    N=int(input())
    dp=[0, 0, 0]
    for _ in range(N):
        a,b,c=map(int, input().split())
        ndp=[0, 0, 0]
        ndp[0]=max(dp[1], dp[2])+a
        ndp[1]=max(dp[2], dp[0])+b
        ndp[2]=max(dp[0], dp[1])+c
        dp=ndp
    print(max(dp))

if __name__=='__main__':
    main()
S = int(input())

if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:
  print('Bad')
else:
  print('Good')


### FIXED CODE ###

s = input()

if s[0] != s[1] and s[1] != s[2] and s[2] != s[3]:
  print('Good')
else:
  print('Bad')
X,Y,A,B,C=list(map(int,input().split()))
p=list(map(int,input().split()))
q=list(map(int,input().split()))
r=list(map(int,input().split()))
p.sort(reverse=True)
q.sort(reverse=True)
r.sort(reverse=True)
kouho=p[:X]+q[:Y]
kouho.sort()
for i in range(C):
    kouho[i]=max(kouho[i],r[i])
print(sum(kouho))



### FIXED CODE ###

X,Y,A,B,C=list(map(int,input().split()))
p=list(map(int,input().split()))
q=list(map(int,input().split()))
r=list(map(int,input().split()))
p.sort(reverse=True)
q.sort(reverse=True)
r.sort(reverse=True)
kouho=p[:X]+q[:Y]
kouho.sort()
for i in range(min(C,X+Y)):
    kouho[i]=max(kouho[i],r[i])
print(sum(kouho))
n, m = map(int, input().split())
edges = [list(map(lambda x: int(x) - 1, input().split())) for _ in range(m)]
edges += [[i, i] for i in range(n)]

q = int(input())
color = [0] * q
dp = [[0 for j in range(n)] for i in range(11)]
for i in range(q):
    v, d, color[i] = map(int, input().split())
    dp[d][v - 1] = i
 
for i in reversed(range(1, 11)):
    for u, v in edges:
        dp[i - 1][u] = max(dp[i - 1][u], dp[i][v])
        dp[i - 1][v] = max(dp[i - 1][v], dp[i][u])
 
print(*[color[dp[0][i]] for i in range(n)], sep = '\n')

### FIXED CODE ###

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

print(sum(a[i * 2 + 1] for i in range(n)))
N,K = int(input())
li = [int(input()) for i in range(N)]
ans = 0
for i in li:
  if i >= K:
    ans += 1
print(ans)

### FIXED CODE ###

N,K = map(int,input().split())
li = list(map(int,input().split()))
ans = 0
for i in li:
  if i >= K:
    ans += 1
print(ans)
import numpy as np
from numba import njit
# from numba import jit

@njit(cache = True)
def main(N, K, A):
    A = np.array(A, dtype = int)
    for k in range(K):
        # print(k)
        B = np.zeros(N + 1, dtype = int)
        for x in range(N):
            minimum = max(0, x - A[x])
            maximum = min(N, x + A[x] + 1)
            # B[minimum:maximum] += 1
            B[minimum] += 1
            B[maximum] -= 1
            A = np.cumsum(B)[:-1]
        if np.all(A == N):
            # print(k)
            break
    print(' '.join([str(i) for i in A]))



if __name__ == '__main__':
    N, K = list(map(int, input().split()))
    A = list(map(int, input().split()))
    main(N, K, A)

### FIXED CODE ###

import numpy as np
from numba import njit


def main(N, K, A):
    @njit(cache = True) # numpyの高速化．雲泥の差になった．知らなかった．
    def rep(N, A):
        B = np.zeros(N + 1, dtype=np.int64) # np.int64としないとnjitがエラー
        for x in range(N):
            minimum = max(0, x - A[x])
            maximum = min(N, x + A[x] + 1)
            # B[minimum:maximum] += 1   # これだと実質for文回してるような感じだから遅い？
            B[minimum] += 1
            B[maximum] -= 1
        # return B  # これだと実質for文回してるような感じだから遅い？
        return np.cumsum(B)[:-1]

    A = np.array(A, dtype=np.int64)
    for k in range(K):
        B = rep(N, A)
        if np.array_equal(A, B):
            break
        else:
            A = B
    return A



if __name__ == '__main__':
    N, K = list(map(int, input().split()))
    A = list(map(int, input().split()))
    print(' '.join([str(i) for i in main(N, K, A)]))
N = int(input())
ans = 0
if(N%2 == 0):
  ans = n/2
else:
  ans = n/2 + 1
print(ans)

### FIXED CODE ###

N = int(input())
ans = 0

if(N%2 == 0):
  ans = N/2
else:
  ans = N/2 + 0.5
  
ans = int(ans)
print(ans)
n = int(input())
a = list(map(int, input().split()))

count = {}
for ai in a:
  count[ai] = count.get(ai, 0) + 1

ans = 0
for key in count.keys():
  ans = max(ans, count.get(key - 1) + count.get(key) + count.get(key + 1))
print(ans)

### FIXED CODE ###

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

count = {}
for ai in a:
  count[ai] = count.get(ai, 0) + 1

ans = 0
for key in count.keys():
  ans = max(ans, count.get(key - 1, 0) + count.get(key) + count.get(key + 1, 0))
print(ans)
X,N = map(int,input().split())
p = list(map(int,input().split()))
for i in range(101):
    if X - i not in p:
        print(x - i)
        exit()
    elif X + i not in p:
        print(x + i)
        exit()

### FIXED CODE ###

X,N = map(int,input().split())
p = list(map(int,input().split()))
for i in range(101):
    if X - i not in p:
        print(X - i)
        exit()
    elif X + i not in p:
        print(X + i)
        exit()
n,m = map(int,input().split())
li = [[0,0] for _ in range(n)]
t1,t2 = 0,0
for i in range(m):
    a,b = input().split()
    if li[int(a)-1][0] != 1:
        if b == "WA":
            li[int(a)-1][1] += 1
        else b == "AC":
            li[int(a)-1][0] += 1
for i in range(n):
    t1 += li[i][0]
    t2 += li[i][1]
print(t1,t2)

### FIXED CODE ###

n,m = map(int,input().split())
li = [[0,0] for _ in range(n)]
t1,t2 = 0,0
for i in range(m):
    a,b = input().split()
    if li[int(a)-1][0] != 1:
        if b == "WA":
            li[int(a)-1][1] += 1
        if b == "AC":
            li[int(a)-1][0] += 1
for i in range(n):
    t1 += li[i][0]
    t2 += li[i][1]*li[i][0]
print(t1,t2)
import math
import itertools
import statistics
#import collections
n = int(input())
A = (map(int, input().split()))
count = 0
while sum(A)%2==0:
    for i in range(n):
        A[i] /= 2
    count += 1

print(count)

### FIXED CODE ###

n = int(input())
# n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
check = False
for i in range(n):
    if a[i] % 2 != 0:
        check = True
        break
count = 0
while check == False:
    for i in range(n):
        a[i] /= 2
        if a[i] % 2 != 0:
            check = True
            break
    count += 1
print(count)
a = input()
b = input()
if a*b%2==0:
  print("Even")
else:
  print("Odd")

### FIXED CODE ###

a,b=map(int,input().split())
if a * b % 2 == 0:
  print("Even")
else:
  print("Odd")