peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
N = int(input())
status = []
for i in range(N):
    S = str(input())
    status.append(S)

print('AC x %d'% status.count("AC"))
print('WA x %d'% status.count('WA'))
print('TLE x %d'% status.count('TLE'))
print('RE x %d'% status.count('RE'))
# Judge status: Wrong Answer
def main():
    import sys
    def input(): return sys.stdin.readline().rstrip()
    n , k = map(int, input().split())
    a = list(map(int, input().split()))
    from heapq import heappop, heappush, heapreplace
    a = [-x for x in a]
    a.sort()
    for i in range(k):
        x = a[0]
        if abs(x) < 1:
            break
        heapreplace(a, x//3)
        heappush(a, x-x//3)
    ans = abs(a[0])
    print(ans)
    


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
d,n = map(int,input().split())
if d == 0:
  print(n)
else:
  print(n * 100**d )
# Judge status: Wrong Answer
S = input()

if len(set(S)) == len(S) :
    print('Yes')
else:
    print('No')
# Judge status: Accepted
n,k = map(int, input().split())
a = list(map(int, input().split()))
a.insert(0,0)
now = 1
seen = [0]*(n+1)
seen[1] = 1
for i in range(1,n+1):
  now = a[now]
  if seen[now] != 0:
    break
  else:
    seen[now] = i+1
if k <= max(seen):
  print(a[seen.index(k)])
elif (k - max(seen)) % (max(seen)-seen[now]+1) == 0:
  print(a[seen.index(max(seen))])
else:
  print(a[seen.index(max(seen) - (max(seen)-seen[now]+1) + (k - max(seen)) % (max(seen)-seen[now]+1))])
# Judge status: Accepted
n = int(input())
mod = 10**9 + 7
ans = (pow(10, n, mod) - ((2 * pow(9, n, mod)) % mod - pow(8, n, mod) + mod) % mod + mod) % mod
print(ans)
# Judge status: Wrong Answer
a,b = map(int,input().split())
if a*b > 81:
  print(-1)
else:
  print(a*b)
# Judge status: Wrong Answer
N = int(input())
a = list(map(int, input().split()))

four = 0
not_four = 0

for i in range(N):
    if a[i] % 4 == 0:
        four += 1

    else:
        not_four += 1

while four > 0 and not_four > 0:
    four -= 1
    not_four -= 2

if four == 0 and not_four <= 0:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
N,Y = [int(i) for i in input().split()]
for i in range(N+1):
    for j in range(N-i, -1, -1):
        money = i*10000 + j*5000 + (N - i - j)*1000
        if money == Y:
            print(i,j,N-i-j)
            exit()
        elif money < Y:
            break
print(-1,-1,-1)
# Judge status: Accepted
s = input()
arr = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
for i in range(7):
    if s==arr[i]:
        print(7-i)
# Judge status: Wrong Answer
n=int(input())
s=[]
for i in range(n):
  s.append(input())
m=int(input())
t=[]
for i in range(m):
  t.append(input())
from collections import Counter
s=Counter(s)
t=Counter(t)
ans=-1000000
for i in s:
  ans=max(ans,s[i]-t.get(i,0))
print(ans)
# Judge status: Wrong Answer
A,B = map(int,input().split())
res = 0
if A >= B:
    res += A
    A-= 1
    if A >= B:
        res += A 
    else:
      res += B
      print(res)
else:
    res += B
    B-= 1
    if A >= B:
        res += A
    else:
      res += B
      print(res)
# Judge status: Wrong Answer
# aアリス　　　ｂボブ
a, b = map(int, input().split())
if a < b:
    print("Bob")
elif b < a:
    print("Alice")
elif a == b:
    print("Draw")
# Judge status: Wrong Answer
x, y = map(int, input().split())
print(x+y/2)
# Judge status: Accepted
from functools import reduce
import fractions
n, m = map(int, input().split())
a = [int(x)//2 for x in input().split()]

y = a[0]

for i in range(1,n):
    y = y*a[i] // fractions.gcd(y,a[i])
    if y > m:
        print(0)
        exit()

for i in range(n):
    if (y // a[i]) % 2 == 0:
        print(0)
        exit()

x = m//y

if x % 2 == 0:
    print(x//2)
else:
    print((x+1)//2)
# Judge status: Wrong Answer
N = int(input())
Q = []
for _ in range(N):
    Q.append(list(map(int, input().split())))

dp = [(0, 0) for _ in range(N)]
for i,v in enumerate(Q[0]):
    if v>dp[0][1]:
        dp[0] = (i, v)
    
for i in range(1, N):
    for j, v in enumerate(Q[i]):
        if j!=dp[i-1][0] and dp[i][1]<v+dp[i-1][1]:
            dp[i] = (j, v+dp[i-1][1])
print(dp[-1][1])
# Judge status: Accepted
from sys import stdin
n,m,k = [int(x) for x in stdin.readline().rstrip().split()]

for i in range(n+1):
    for j in range(m+1):
        kosuu = (m-j)*i+(n-i)*j
        if kosuu == k:
            print("Yes")
            exit()
print("No")
# Judge status: Accepted
x,y,z = map(int, input().split())
print((x-z)//(y+z))
# Judge status: Accepted
n,m=map(int,input().split())
a = [-1]*(n+1)

ans = 0
for i in range(m):
  s,c=map(int,input().split())
  if a[s] == -1 or a[s] == c:
    a[s] = c
  else:
    print(-1)
    exit()
if n == 1:
  print(max(0, a[1]))
  exit()
if a[1] == 0:
  if n>1:
    print(-1)
    exit()
  else:
    print(ans)
else:
  ans = max(1, a[1])
  for i in range(2, n+1):
    ans = ans*10+max(0, a[i])
print(ans)
# Judge status: Accepted
l=list(map(int,input().split()))
l=set(l)
print(len(l))
# Judge status: Accepted

r,g,b = map(int,input().split())
a = r *100+g*10+b
if a % 4 == 0:
    print('YES')
else:
    print('NO')
# Judge status: Wrong Answer
from sys import exit
import math
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

s=input()

key = "keyence"

for i in range(len(s)):
    j = i + len(s) -7
    if s[:i] + s[j:] == key:
        print("Yes")
        exit()
print("No")
# Judge status: Wrong Answer
# ABC157 B
import numpy as np
a = [list(input()) for i in range(3)]
a = np.ravel(a)
n = int(input())
b = [input() for i in range(n)]
ans = 'No'
for i in b:
    for j in range(3):
        if i in a[j*3:j*3+2] or i in a[j:j+6:3]:
            ans = 'Yes'
    if i in a[0:8:4] or i in a[2:6:2]:
        ans = 'Yes'
print(ans)
# Judge status: Accepted
N = int(input())
s = input()
t = input()
i = 0
while True:
    if s[i:] == t[:(N - i)]:
        break
    i += 1
print(N + i)
# Judge status: Accepted
n = int(input())
w = list(map(int, input().split()))
s = [0]*(n+1)
for i in range(n):
    s[i+1] = s[i] + w[i]
ans = 1000000
for i in range(n+1):
    ab = abs(s[i] - (s[n]-s[i]))
    if ans >= ab:
        ans = ab

print(ans)
# Judge status: Accepted
n = int(input())
x = list(map(int,input().split()))
a = sorted(x)
m1,m2 = a[n//2-1],a[n//2]
for i in x:
    if i>=m2:print(m1)
    else:print(m2)
# Judge status: Wrong Answer
def get_answer():
  x = int(input())
  
  is_get = False
  for a in range(1000000000):
    if is_get:
      break
    for b in range(-1*a, a, 1):
      if x == a**5 - b**5:
        is_get = True
        break
        
  print(f"{a-1} {b}")
# Judge status: Wrong Answer
s = input()
n = len(s)
s = s[:-2]
for _ in range(n):
  n = len(s)
  m = int(n/2)
  if s[:m] == s[m:]:
    print(s)
    break
  else:
    s = s[:-2]
# Judge status: Accepted
N, x = map(int, input().split())
array = list(map(int, input().split()))
a = sorted(array, reverse=False)
#print(a)
answer = 0
for i in range(N):
    x -= a[i]
    if x < 0:
        break
    answer += 1
    if i == N-1 and x != 0:
        answer -= 1
        break
    if x < a[i]:
        break
print(answer)
# Judge status: Wrong Answer
N=int(input())

for i in range(1,10):
	for j in range(1,10):
		if i+j==N:
			print("Yes")
			exit()
		
print("No")
# Judge status: Wrong Answer
import sys
import math

input = sys.stdin.readline
MOD = 1000000007

X = int(input())

sa = 100000
res = 0

if X == 1:
    print(1)
else:
    for i in range(2,X):
        a = int(math.log(X,i))
        if (sa > (X - (i**a))) & ( a != 1):
            sa = X - (i**a)
            res = i**a

    print(res)
# Judge status: Accepted
A,V = map(int, input().split())
B,W = map(int, input().split())
T = int(input())

if A == B or V-W > 0 and abs(A-B) <= T*(V-W):
    print('YES')
else:
    print('NO')
# Judge status: Wrong Answer
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if e - a > k:
    print("Yay!")
else:
    print(":(")
# Judge status: Wrong Answer
N=int(input())
S=input()
r,g,b = S.count('R'),S.count('G'),S.count('B')
total = r*g*b

count = 0
for d in range(1,N//2):
  for i in range(N-2*d):
    if S[i]!=S[i+d] and S[i+d]!=S[i+2*d] and S[i+2*d] != S[i]:
      count+=1

print(total-count)
# Judge status: Accepted
s = input().split()
numOfA = int(s[0])
numOfB = int(s[1])
numOfC = int(s[2])
pickNum = int(s[3])
maxOutcome = 0

if pickNum < numOfA:
    maxOutcome = pickNum
elif pickNum >= numOfA and pickNum <= (numOfA + numOfB):
    maxOutcome = numOfA
elif pickNum >numOfA +numOfB:
    maxOutcome = numOfA - (pickNum - numOfA - numOfB)

print(maxOutcome)
# Judge status: Wrong Answer
s = str(input())
k = int(input())
for i in range(len(s)):
    if s[i] != "1":
        print(s[i])
        break
else:
    print(1)
# Judge status: Accepted
from collections import deque

k = int(input())

a = deque([9,8,7,6,5,4,3,2,1])
current_num = 0

for i in range(k):
  current_num = a.pop()
  current_str = str(current_num)
  current_last = int(current_str[-1])

  up = ""  
  mid = current_str + str(current_last)
  down = ""

  if current_last >= 0 and current_last <= 8:
    up = current_str + str(current_last + 1)

  if current_last >= 1 and current_last <= 9:
    down = current_str + str(current_last - 1)
  
  if len(down) != 0:
    a.appendleft(down)

  a.appendleft(mid)

  if len(up) != 0:
    a.appendleft(up)

print(current_num)
# Judge status: Accepted
# https://atcoder.jp/contests/abc060/tasks/abc060_b
a, b, c = map(int, input().split())

t = a
s = 0
while True:
    s = (t % b) % b
    t += a
    if s == c:
        print('YES')
        break
    elif s == 0:
        print('NO')
        break
# Judge status: Accepted
def solve():
    x = int(input())

    for a in range(-118, 120):
        for b in range(-119, 119):
            if a**5 - b**5 == x:
                return a, b





print(*solve())
# Judge status: Accepted
S = input()
T = input()

count = "No"
for i in range(len(S)):
    S = S[-1] + S[:-1]
    if S == T:
        count = "Yes"

print(count)
# Judge status: Accepted
n,x,*a = map(int,open(0).read().split())
b = [0]*n
b[0] = min(x,a[0])
for i in range(n-1):
  b[i+1] = max(min(x-b[i],a[i+1]),0)
  b[i] = min(b[i],x-b[i+1])
ans = 0
for i,j in zip(a,b):
  ans += i-j
print(ans)
# Judge status: Accepted
K,X=map(int,input().split())

def create_num(K,X):
    ans = [X-(K-1) + i for i in range(K*2-1)]
    return ans

if K == 1:
    print(X)
else:
    ans = create_num(K,X)
    L=[str(a) for a in ans]
    L=" ".join(L)
    print(L)
# Judge status: Wrong Answer
A = list(map(int,input().split()))
A.sort()
ret = 0
ret += A[2]-A[1]
A[1] += ret
A[0] += ret
ret += (A[1]-A[0]-1+2)//2
print(ret)
# Judge status: Accepted
n = int(input())
X = list(map(int, input().split()))

ans = 10 ** 10
for i in range(1, 101):
    hp = 0
    for x in X:
        hp += (x - i) ** 2
    ans = min(ans , hp)
print(ans)
# Judge status: Accepted
N=int(input())

b=-2
temp=N
ans=""
while True:
    if temp%b!=0:
        ans="1"+ans
        temp=temp-(b//(-2))
    else:
        ans="0"+ans
    b=b*(-2)
    if temp==0:break

print(ans)
# Judge status: Accepted
X = int(input())
t = 100
i = 1

while True:
  t = int(t*1.01)
  if t >= X:
    print(i)
    break
  i += 1
# Judge status: Wrong Answer
N = int(input())
AB = [0] * N
for n in range(N):
  AB[-1-n] = [int(x) for x in input().strip().split()]
ans = 0
cnt = 0
for (a, b) in AB:
  if b == 1:
    continue
  t = b - ((a + cnt) % b)
  cnt += t
  ans += t
print(ans)
# Judge status: Wrong Answer
s=input()

for i in range(len(s)):
  if s[i]=='A':
    a=i
for i in reversed(range(len(s))):
  if s[i]=='Z':
    x=i
print(x-a+1)
# Judge status: Accepted
n=int(input())
ans=float('inf')

def digitSum(n):
    # 数値を文字列に変換
    s = str(n)
    # １文字ずつ数値化し配列にする。
    array = list(map(int, s))
    # 合計値を返す
    return sum(array)

for i in range(1,n):
    a=i
    b=n-i
    ans=min(ans,digitSum(a)+digitSum(b))

print(ans)
# Judge status: Wrong Answer
def resolve():
    N, K = map(int, input().split())
    A = []
    for i in range(K):
        d = int(input())
        a = map(int, input().split())
        A.append(a)
    print(N - len(set(A)))
resolve()
# Judge status: Wrong Answer
import math
N=int(input())
ans=0
A=[]
for i in range(N):
  a=int(input())
  
  ans+=a//2
  a%=2
  
  if i!=0:
    if A[i-1]==1 and a==1:
      ans+=1
      a-=1
  A.append(a)
print(ans)
# Judge status: Wrong Answer
x = str(input())
l = [x[0], x[1], x[2], x[3]]
m = [int(s) for s in l]
N = 2 ** 3
for i in range(N):
  n = [m[0], 0, 0, 0]
  o = [] # +か-かを記憶
  for j in range(3):
    if (i >> j) & 1:
      n[-j-1] = -m[-j-1]
      o.append('-')
    else:
      n[-j-1] = m[-j-1]
      o.append('+')
  if sum(n) == 7:
    print(str(m[0]) + o[0] + str(m[1]) + o[1] + str(m[2]) + o[2] + str(m[3]) + '=7')
    exit()
# Judge status: Wrong Answer
x=list(input())
t=x.count("T")
s=x.count("S")
num=0
num2=0
if x[0]=="T":
    num=1
    for i in range(1,len(x)):
        if x[i]=="S":
            break
        else:
            num+=1
if x[-1]=="S":
    num2=1
    for i in range(len(x)-1):
        if x[-2-i]=="T":
            break
        else:
            num2+=1
t-=num
s-=num2
print((s+t)-(min(s,t)*2)+num+num2)
# Judge status: Wrong Answer


a = int(input("\n"))

if a >= 10:
    print("Number too big")

elif a <= 0:
    print("Number too small")
    
else:
    print(a + (a**2) + (a**3))
# Judge status: Accepted
n = int(input())
s = list(input())
cnt = 0
ans_list = [0]
e_cnt = 0

for i in range(1,n):
    if s[i-1] == "E" and s[i] == "E":
        cnt -= 1
        e_cnt += 1
    if s[i-1] == "E" and s[i] == "W":
        cnt -= 0
    if s[i-1] == "W" and s[i] == "E":
        cnt += 0
        e_cnt += 1
    if s[i-1] == "W" and s[i] == "W":
        cnt += 1
    ans_list.append(cnt)

print(min(ans_list) + e_cnt)
# Judge status: Accepted
x = int(input())
a = x//500
x = x - a*500
b = x//5
print(a*1000+b*5)
# Judge status: Accepted
n,a,b = map(int,input().split())

ans = 0
if n==0 or (n==1 and a!=b) or (a>b):
  pass
elif (n==1) and (a==b):
  ans = 1
else:
  ans = (n-2)*(b-a)+1
  
print(ans)
# Judge status: Wrong Answer
h1, m1, h2, m2, k = map(int, input().split())

sabunh = h2 - h1
sabunm = m2 - m1 
zikantai = sabunh * 60 + sabunm
ans = 0
zikantai -= k
while(zikantai > 0):
    zikantai -= k
    ans += k
print(ans)
# Judge status: Wrong Answer
x=input()
ans=0
ind=x.find("ST")
while(ind!=-1):
    ans+=2
    s_ind=ind-1
    t_ind=ind+2
    while(0<=s_ind and t_ind<len(x) and x[s_ind]=="S" and x[t_ind]=="T"):
        ans+=2
        s_ind-=1
        t_ind+=1
    ind=x.find("ST",ind+1)
print(len(x)-ans)
# Judge status: Wrong Answer
N,K= map(int, input().split())
p = list(map(int, input().split()))

print(sum(sorted(p)[:N]))
# Judge status: Wrong Answer
N = int(input())
L1 = list(map(int,input().split()))
L2 = list(map(int,input().split()))
ans= 0
for i in range(5):
    s = sum(L1[:i+1]) + sum(L2[i:])
    ans = max(ans,s)
print(ans)
# Judge status: Accepted
A, B, C, D = map(int, input().split())
def div_num(a, b, c):
    if (a%c)==0:
        return (b//c)-(a//c)+1
    else:
        return (b//c)-(a//c)
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
XC = div_num(A, B, C)
XD = div_num(A, B, D)
XCD = div_num(A,B,int((C*D)/gcd(C,D)))
print(B-A+1-(XC+XD-XCD))
# Judge status: Accepted
N = int(input())
H = list(map(int,input().split()))

cnt = 0
maxcnt = 0 


for i in range(N-1):
    
    if H[i] >= H[i+1]:
        cnt+=1
    else:
        maxcnt = max(maxcnt,cnt)
        cnt=0
    
        
result = max(maxcnt,cnt)
    

print(result)
# Judge status: Accepted
N, M = map(int, input().split())

res = [0]*10**5

for i in range(N):
    a, b = map(int, input().split())
    res[a-1]+=b

count = 0
for i,r in enumerate(res):
    count+=r
    if count >= M:
        print(i+1)
        break
# Judge status: Accepted
n = int(input())
ans  = [0 for i in range(10**5)]
for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            ans[x**2 + y**2 + z**2 + x*y + y*z + z*x] += 1

for i in range(1,n+1):
    print(ans[i])
# Judge status: Accepted
from math import atan,degrees
a,b,x = map(int,input().split())
if x <= a*a*b/2:
    ans = atan(a*b*b/(2*x))
else:
    ans = atan(2*b/a-2*x/a**3)
print(degrees(ans))
# Judge status: Accepted
a, b = map(int, input().split())

s=a-1
t=b-1
ans=(t+s-1)//s
print(ans)
# Judge status: Wrong Answer
import math
n,d=map(int,input().split())
a = [list(map(int, input().split())) for l in range(n)]
sum=0
for i in range(len(a)-1):
  for j in range(1):
    if d >= math.sqrt(a[i][j]**2+a[i+1][j+1]**2):
     sum+=1
print(sum)
# Judge status: Accepted
X,Y=map(int,input().split())

if X%Y==0:
  print(-1)
else:
  for i in range(1,(10**18)//X+1):
    if i*X%Y!=0:
      print(i*X)
      break
# Judge status: Wrong Answer
s = input()
ans = []
ans_2 = ""
for i in range(len(s)):
  if s[i] == "0":
    ans.append("0")
  elif s[i] == "1":
    ans.append("1")
  elif s[i] == "B":
    if len(ans) == 0:
      continue
    else:
      ans.remove(ans[len(ans)-1])
for i in range(len(ans)):
  ans_2 += str(ans[i])
print(ans_2)
# Judge status: Accepted
w,h,x,y = map(int, input().split())

print(w * h / 2, 1 if (x == w / 2) and (y == h / 2) else 0)
# Judge status: Accepted
x, y = map(int, input().split())
ans = abs(abs(x)-abs(y))
if x*y > 0:
    if x <= y:
        print(ans)
    else:
        print(ans+2)
elif x*y < 0:
    print(ans+1)
else:
    if x <= y:
        print(ans)
    else:
        print(ans+1)
# Judge status: Wrong Answer
N,R = map(int,input().split())
if N < 10:
  print(R + 100*(100-N))
else:
  print(R)
# Judge status: Wrong Answer
a,b,c = map(int,input().split())

if abs(a-b) > abs(a-c):
    print('A')
else:
    print('B')
# Judge status: Accepted
a = [int(x) for x in input().split()]

if a.count(5) == 2 and a.count(7) == 1:
    print("YES")
else:
    print("NO")
# Judge status: Wrong Answer
a, b = input().split()

print(a*int(b) if "a"*int(b) <= "b"*int(a) else "b"*int(a))
# Judge status: Accepted
s = input()

a = int(s[:2])
b = int(s[2:])

if a <= 12 and a != 0:
  if b <= 12 and b != 0:
    print("AMBIGUOUS")
  elif b > 12 or b == 0:
    print("MMYY")
else:
  if b > 12 or b == 0:
    print("NA")
  elif b <= 12:
    print("YYMM")
# Judge status: Wrong Answer
A,B=map(int,input().split())
print(min(2*A-1,A+B,2*B-1))
# Judge status: Accepted
keep=0
keeeep=1
for i in range(1,int(input())+1):
  count=0
  kept=i
  while kept%2==0:
    count+=1
    kept=kept//2
  if count>keep:
    keeeep=i
    keep=count
print(keeeep)
# Judge status: Accepted
N = int(input())
S = []
for _ in range(N):
    S.append(input())

import collections    
C = collections.Counter(S)
M = C.most_common()[0][1]
R = [c for c in C.keys() if C[c]==M]
R.sort()

for r in R:
    print(r)
# Judge status: Accepted
Q,H,S,D = map(int,input().split())
N = int(input())

ans = min(8 * Q,4 * H,2 * S ,D) * (N // 2) + min(4 * Q,2 * H,S) * (N % 2)

print(ans)
# Judge status: Accepted
def ifif(s):
  if s:
    print("Yes")
  else:
    print("No")

###senkei

def ri(): return int(input())
def rli(): return list(map(int, input().split()))
def rls(): return list(map(str, input().split()))
def pl(a): print(" ".join(list(map(str, a))))
def ma():return map(int,input().split())
from itertools import accumulate as acc
import operator as op
import copy as cp
import math; import numpy
from bisect import bisect_left as bisl
from bisect import bisect_right as bisr
###
n=ri()
a=[]
for i in range(1,n+1):
    if i%3==0 or i%5==0:
        a.append(0)
    else:
        a.append(i)

print(sum(a))
# Judge status: Wrong Answer
n = int(input())

if n > 81:
    print("No")
else:
    for i in range(1, 10):
        if (n % i) == 0:
            print("Yes")
            break
        else:
            print("No")
            break
# Judge status: Accepted
from math import ceil


def main():
    area = int(input())
    upper_limit = 10 ** 9
    answer = [0, 0, upper_limit, 1, 0, ceil(area / upper_limit)]
    answer[4] = upper_limit * answer[5] - area
    print(" ".join(map(str, answer)))


if __name__ == '__main__':
    main()
# Judge status: Accepted
import re
a=0
for m in re.findall('(<*)(>*)',input()):u,v=map(len,m);a+=(u*u-u+v*v-v)//2+max(u,v)
print(a)
# Judge status: Accepted
n,k = [int(ch) for ch in input().split()]
snuckList = []
for i in range(n):
    snuckList.append(i+1)
for i in range(k):
    cnt = int(input())
    snucks = [int(ch) for ch in input().split()]
    for snuck in snucks:
        if snuck in snuckList: 
            snuckList.remove(snuck)
print(len(snuckList))
# Judge status: Wrong Answer
x=int(input())
i=1
if x==0:
    print(0)
else:
    while True:
        if (i-2)*(i-1)/2+1<=x<=i*(i-1)/2:
            break
        i+=1
    print(i)
# Judge status: Accepted
l = sorted(map(int, input().split()))

print(l[2] * 10 + l[1] + l[0])
# Judge status: Accepted
def resolve():
	n, k = map(int, input().split())
	B = [0]*10**5
	for _ in range(n):
		a, b = map(int, input().split())
		B[a-1] += b
	cnt = 0
	for i in range(len(B)):
		cnt += B[i]
		if cnt >= k:
			print(i+1)
			break
resolve()
# Judge status: Wrong Answer
N = int(input())
L = list(map(int, input().split()))
L.sort()
if L[-1] > (sum(L) - L[-1]):
    print("Yes")
else:
    print("No")
# Judge status: Accepted
N = int(input())
xy = [map(int, input().split()) for _ in range(N)]
x, y = [list(i) for i in zip(*xy)]
dis1 = [0] * N
dis2 = [0] * N
for i in range(N):
        dis1[i] = x[i] + y[i]
        dis2[i] = x[i] - y[i]
max_dis1 = max(dis1)
min_dis1 = min(dis1)
max_dis2 = max(dis2)
min_dis2 = min(dis2)
max_dis = max([max_dis1 - min_dis1,-min_dis2 + max_dis2])
print(max_dis)
# Judge status: Accepted
n,m,x=(int(i) for i in input().split())
l=[]
ans=None
for i in range(n):
  l.append([int(i) for i in input().split()])
for i in range(2**n):
  k=i
  r=[0 for i in range(m)]
  cost=0
  for j in range(n):
    if k%2==1:
      for y in range(m):
        r[y]+=l[j][y+1]
      cost+=l[j][0]
    k=k//2
  if min(r)>=x:
    if ans==None:
      ans=cost
    elif ans>cost:
      ans=cost
if ans==None:
  print('-1')
else:
  print(ans)
# Judge status: Wrong Answer
n, p = map(int, input().split())
a = list(map(int, input().split()))

jug = True
for i in range(n):
    a[i] % 2 == 1
    jug = False
    break

if jug:
    if p == 0:
        print(2 ** n)
    else:
        print(0)

else:
    print(2 * (n - 1))
# Judge status: Wrong Answer
# B
S = input()
if "R" in S[::2] or "L" in S[1::2]:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
from math import ceil
n, h = map(int, input().split())
cut = set()
throw = []

for _ in range(n):
    a, b = map(int, input().split())
    cut.add(a)
    throw.append(b)

throw.sort(reverse=True)
ans = 0
tmp = []
m_cut = max(cut)

for t in throw:
    if t > m_cut:
        tmp.append(t)

if h > sum(tmp):
    ans += ceil((h - sum(tmp)) / m_cut)
    h -= m_cut * ans

if len(tmp) > ceil(h / m_cut):
    ans += ceil(h / m_cut)
else:
    ans += len(tmp)
print(ans)
# Judge status: Accepted
x = int(input())
money = 100
years = 0
while money < x:
    money += int(money*0.01)
    years += 1
print(years)
# Judge status: Wrong Answer
a, b,c  = map(int, input().split()) 
k  = int(input()) 

for i in range(k):
  if b > c:
    c *= 2
  elif a > b:
    b *= 2
  else:
    c *= 2

if (b > a) and (c > b):
  result = "Yes"
else:
  result = "No"
    
print(result)
# Judge status: Accepted
def main():
    a = input()
    if a.isupper():
        print('A')
    else:
        print('a')

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
n, m = map(int, input().split())
x = list(map(int, input().split()))
d = []
if n >= m:
    print(0)

else:
    x.sort()
    for i in range(m - 1):
        d.append(abs(x[i] - x[i + 1]))
    d.sort()
    print(sum(d[:n+1]))
# Judge status: Wrong Answer
a,b,c,d = map(int, input().split())

if (b<=c)|(d<=a):
    print(0)
else:
    if (a<=c)&(d<=b):
        print(d-c)
    elif (c<=a)&(b<=d):
        print(b-c)
    elif (a<=c)&(b<=d):
        print(b-a)
    else:
        print(c-b)
# Judge status: Accepted
import bisect
from copy import deepcopy
N = int(input())
L = sorted(map(int, input().split()))

ans = 0
for i in range(N):
    for j in range(i + 1, N - 1):
        b = L[j] + L[i]
        x = bisect.bisect_left(L, b) - j - 1
        if x > 0:
            ans += x

print(ans)
# Judge status: Accepted
a,b,c = map(int,input().split())

h = a + b + c
i = max(a,b,c)
j = i * 10
print(j + h - i)