Harryxun/stf_run huggingface dataset:
x = input()
y = input()

if x + y >= 10 :
  print("error")
else:
  print(x+y)

### FIXED CODE ###

x, y = input().split()

x = int(x)
y = int(y)

if x + y >= 10 :
  print("error")
else:
  print(x+y)
a, b, c, d = (int(i) for i in input().split())

print(max(min(b,d)-(max(a,c), 0))

### FIXED CODE ###

a, b, c, d = (int(i) for i in input().split())

print(max(min(b,d)-(max(a,c)), 0))
import numpy as np
h, w, m = map(int, input().split())
arr = np.zeros([h,w])

### FIXED CODE ###

h, w, m = map(int, input().split())
h_cnt = [0 for i in range(h)]
w_cnt = [0 for i in range(w)]
bomb = set()

for i in range(m):
    _h, _w = map(int, input().split())
    h_cnt[_h-1] += 1
    w_cnt[_w-1] += 1
    bomb.add(((_h-1),(_w-1))) #爆破対象の位置を判断

h_max = max(h_cnt)
w_max = max(w_cnt)

max_h = []
max_w = []

for i in range(h):
    if h_cnt[i] == h_max:
        max_h.append(i)

for i in range(w):
    if w_cnt[i] == w_max:
        max_w.append(i)

flg = True

for i in max_h:
    for j in max_w:
        if (i,j) not in bomb:
            flg = False
            break
print(h_max+w_max-1 if flg else h_max+w_max)
# Sを入力する
S = input().split(" ")
# Lを入力する
L = input().split(" ")

# 3つの要素に定義しなおす
S1 = S[0]
S2 = S[1]
S3 = S[2]
L1 = L[0]
L2 = L[1]
L3 = L[2]

# 全部同じ
if S1 == L1 and S2 == L2  S3 == L3:
  print(3)
# 全部違う
elif S1 != L1 and S2 != L2  S3 != L3:
  print(0)
# 一つだけ
elif (S1 == L1 and S2 != L2  S3 != L3) or (S1 != L1 and S2 == L2  S3 != L3) or (S1 != L1 and S2 != L2  S3 == L3):
  print(1)
# その他
else:
  print(2)
end

### FIXED CODE ###

# Sを入力する
S = list(input())
# Lを入力する
L = list(input())
 
# 3つの要素に定義しなおす
S1 = S[0]
S2 = S[1]
S3 = S[2]
L1 = L[0]
L2 = L[1]
L3 = L[2]
 
# 全部同じ
if S1 == L1 and S2 == L2 and S3 == L3:
  print(3)
# 全部違う
elif S1 != L1 and S2 != L2 and S3 != L3:
  print(0)
# 一つだけ
elif (S1 == L1 and S2 != L2 and S3 != L3) or (S1 != L1 and S2 == L2 and S3 != L3) or (S1 != L1 and S2 != L2 and S3 == L3):
  print(1)
# その他
else:
  print(2)
N=int(input())
A=map(int, input().split())
maxnum=max(A)
minnum=min(A)
print(maxnum-minnum)


### FIXED CODE ###

N=int(input())
A=list(map(int, input().split()))
print(max(A)-min(A))
from sys import stdin
def sqmatrix(n):
  return [[0] * n for i in range(n)]

def magicsq(m):
    n = len(m)
    j = n/2
    i = j + 1
    for num in range(1, n**2 + 1):
        m[i][j] = num
        i += 1
        j += 1
        i = i%n
        j = j % n
        if m[i][j] != 0:
            i += 1
            j -= 1
        if j < 0:
            j = n -1
        i = i % n
    return m

for line in stdin:
    n = int(line)
    if n == 0:
        break
    sm = sqmatrix(n)
    for row in magicsq(sm): print (' '.join(map(str,row)))

### FIXED CODE ###

from sys import stdin
def sqmatrix(n):
  return [[0] * n for i in range(n)]

def magicsq(m):
    n = len(m)
    j = int(n/2)
    i = j + 1
    for num in range(1, n**2 + 1):
        m[i][j] = num
        i += 1
        j += 1
        i = i%n
        j = j % n
        if m[i][j] != 0:
            i += 1
            j -= 1
        if j < 0:
            j = n -1
        i = i % n
    return m

for line in stdin:
    n = int(line)
    if n == 0:
        break
    sm = sqmatrix(n)
    for row in magicsq(sm): print (''.join(map(lambda x: str(x).rjust(4, ' '),row)))
def cv(t):
	return t/100*60+t%100

while 1:
	n=input(); p=input(); q=input()
	if n==0: break
	v=[0]*1440
	for i in range(n):
		k=input()
		for j in range(k):
			a=input(); b=input();
			for l in range(cv(a),cv(b)):
				v[l]+=1
	m=c=0
	for i in range(cv(p),cv(q)):
		c=c+1 if v[i]<n else 0
		m=max(m,c)
	print m

### FIXED CODE ###

def get():
	return map(int,raw_input().split())
def cv(t):
	return t/100*60+t%100
while 1:
	n,p,q=get()
	if n==0: break
	v=[0]*1440
	for i in range(n):
		k=get()[0]; a=get()
		for j in range(k):
			for l in range(cv(a[::2][j]),cv(a[1::2][j])):
				v[l]+=1
	m=c=0
	for i in range(cv(p),cv(q)):
		c=(c+1)*(v[i]<n)
		m=max(m,c)
	print m
from itertools import*
for p, q in zip(*[len(list(l)) for _, l in groupby(input())]*2):
    print("0 "*~-p, -~p//2 + q//2, p//2 + -~q//2, "0 "*~-q, end="")

### FIXED CODE ###

from itertools import*
a = [len(list(l)) for _, l in groupby(input())]
for p, q in zip(a[::2], a[1::2]):
    print("0 "*~-p, -~p//2 + q//2, p//2 + -~q//2, "0 "*~-q, end="")
import sys

def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp
    return a

def list_to_string(a):
    s = ""
    for n in a:
        s += str(n) + " "
    return s.strip()

num = int(sys.stdin.readline().strip())

array = map(lambda x: int(x), sys.stdin.readline().strip().split(" "))

flag = True
swap_num = 0

while flag:
    flag = False
    for i in range(1, len(array)).reverse():
        if array[i] < array[i - 1]:
            swap(a, i, i-1)
            flag = True
            swap_num += 1
            
print list_to_string(array)
print str(swap_num)

### FIXED CODE ###

import sys

def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp
    return a

def list_to_string(a):
    s = ""
    for n in a:
        s += str(n) + " "
    return s.strip()

num = int(sys.stdin.readline().strip())

array = map(lambda x: int(x), sys.stdin.readline().strip().split(" "))

flag = True
swap_num = 0

while flag:
    flag = False
    for i in reversed(range(1, len(array))):
        if array[i] < array[i - 1]:
            swap(array, i, i-1)
            flag = True
            swap_num += 1
            
print list_to_string(array)
print str(swap_num)
a,b = map(float,input().split())
c = b * 100
print(math.floor(a*c // 100))

### FIXED CODE ###

#C
from decimal import *
import math
a,b = map(Decimal,input().split())

print(math.floor(a*b))
def main():
  n, k = map(int, input().rstrip().split())
  
  if n % k <= k / 2:
	print(n % k)
  else:
    print(k - (n % k))


if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
  n, k = map(int, input().rstrip().split())
  
  if n % k <= k / 2:
    print(n % k)
  else:
    print(k - (n % k))


if __name__ == '__main__':
  main()
100000 1000000000

### FIXED CODE ###

import math
n,m = map(int, input().split())
factors = []
comp = m//n
for i in range(int(math.sqrt(m)),0,-1):
    if(m%i==0):
        factors.insert(0,i)
        factors.append(m//i)
for item in factors[::-1]:
    if (item <= comp):
        print(item)
        exit(0)
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

def main():
    n, m, x = nm()
    arr = []
    for _ in range(n):
        temp = nl()
        arr.append(temp)

    costs = []
    for i in range(2**n):
        binary = bin(i)[2:]
        binary = '0'*(m-len(binary)) + binary
        count = [0]*m
        cost = 0
        for i, num in enumerate(binary):
            if num == '1':
                for j in range(m):
                    count[j] += arr[i][j+1]
                cost += arr[i][0]
        #print(binary, cost)
        flag = True
        for value in count:
            if value < x:
                flag = False
        if flag:
            costs.append(cost)
    if costs == []:
        print(-1)
    else:
        print(min(costs))
    

if __name__ == '__main__':
    main()

### FIXED CODE ###

import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

def main():
    n, m, x = nm()
    arr = []
    for _ in range(n):
        temp = nl()
        arr.append(temp)

    costs = []
    for i in range(2**n):
        binary = bin(i)[2:]
        binary = '0'*(n-len(binary)) + binary
        count = [0]*m
        cost = 0
        for i, num in enumerate(binary):
            if num == '1':
                for j in range(m):
                    count[j] += arr[i][j+1]
                cost += arr[i][0]
        #print(binary, cost)
        flag = True
        for value in count:
            if value < x:
                flag = False
        if flag:
            costs.append(cost)
    if costs == []:
        print(-1)
    else:
        print(min(costs))
    

if __name__ == '__main__':
    main()
import math

a,b,c,d = map(int,input().split())
tn = b-a+1


cn = (b//c)-(a-1)//c
dn = (b//d)-(a-1)//d
#最少公倍数
cd = (c*d)//math.gcd(c, d)
cdn = (b//cd)-(a-1)//cd

print(tn-cn-dn+cdn)

### FIXED CODE ###

import fractions

a,b,c,d = map(int,input().split())
tn = b-a+1

cn = (b//c)-(a-1)//c
dn = (b//d)-(a-1)//d
cd = (c*d)//fractions.gcd(c, d)
cdn = (b//cd)-(a-1)//cd

print(tn-cn-dn+cdn)
n,x = map(int,input().split())
xs = list(map(int,input().split()))
xs.append(x)
xs.sort()
n_xs = []
for i in range(1,n):
  n_xs.append(xs[i]-xs[i-1])
import fractions
ans = n_xs[0]
for i in range(1, n-1):
  ans = fractions.gcd(ans, n_xs[i])
print(ans)

### FIXED CODE ###

n,x = map(int,input().split())
xs = list(map(int,input().split()))
xs.append(x)
xs.sort()
n_xs = []
for i in range(1,n+1):
  n_xs.append(xs[i]-xs[i-1])
import fractions
ans = n_xs[0]
for i in range(1, n):
  ans = fractions.gcd(ans, n_xs[i])
print(ans)
#!/usr/bin/env python3
import sys
input = lambda: sys.stdin.readline().strip()
from math import gcd
from functools import reduce

def lcm(a, b):
    return a // gcd(a, b) * b

MOD = 1000000007  # type: int

def solve(N: int, A: "List[int]"):
    x = reduce(lcm, A)
    ans = 0
    for ai in A:
        ans += x // ai
        ans %= MOD
    print(ans)

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys
input = lambda: sys.stdin.readline().strip()

MOD = 1000000007  # type: int

def modinv(x):
    return pow(x, MOD - 2, MOD)

def solve(N: int, A: "List[int]"):
    factors = [0 for i in range(10**6 + 1)]
    for x in A:
        i = 2
        while i * i <= x:
            curr = 0
            while x % i == 0:
                curr += 1
                x //= i
            factors[i] = max(factors[i], curr)
            i += 1
        if x > 1:
            factors[x] = max(factors[x], 1)
    lcm = 1
    for i in range(10**6 + 1):
        lcm *= pow(i, factors[i], MOD)
        lcm %= MOD
    ans = 0
    for ai in A:
        ans += lcm * modinv(ai) % MOD
        ans %= MOD
    print(ans)

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)

if __name__ == '__main__':
    main()
N = int(input())
A = list(map(int, input().split()))
res = 0
for i in range(N):
    if i + 1 == A[A[A[i]-1]]:
        res += 1 
print(res)

### FIXED CODE ###

N = int(input())
A = [0] + list(map(int, input().split()))
res = 0
for i in range(1, N):
    if i == A[A[i]]:
        res += 1
        A[A[i]] = 0
print(res)
a,b=input(),input()
c=int(a)-int(b)+1
print(c)

### FIXED CODE ###

a,b=map(int,input().split())
t=a-b+1
print(t)
N=input()
if N[-1] == "3":
  return "bon"

### FIXED CODE ###

N=input()
if N[-1] == "3":
  print("bon")
elif int(N[-1]) in [2,4,5,7,9]:
  print("hon")
else:
  print("pon")
import math
import heapq
from collections import Counter

#N,K=map(int, input[].split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
#x=list(map(int, input[].split()))  #リスト入力 「a1 a2 a3 ...」みたいな配列のような入力のとき

N,K=map(int, input[0].split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
A=list(map(int, input[1].split()))  #リスト入力 「a1 a2 a3 ...」みたいな配列のような入力のとき

S=Counter(A)
s= S.most_common(K)

print(N-[sum(x) for x in zip(*s)][1])


### FIXED CODE ###

import math
import heapq
from collections import Counter

#N,K=map(int, input[].split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
#x=list(map(int, input[].split()))  #リスト入力 「a1 a2 a3 ...」みたいな配列のような入力のとき

N,K=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
A=list(map(int, input().split()))  #リスト入力 「a1 a2 a3 ...」みたいな配列のような入力のとき

S=Counter(A)
s= S.most_common(K)

print(N-[sum(x) for x in zip(*s)][1])
import bisect, copy, heapq, math, sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
def celi(a,b):
    return -(-a//b)
sys.setrecursionlimit(5000000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

n=int(input())
a=list(map(int,input().split()))
pc="pairwise coprime"
sc="setwise coprime"
nc="not coprime"
a.sort()
tmp=a[0]

for i in range(n):
    tmp=math.gcd(tmp,a[i])
if tmp!=1:
    print(nc)
    exit()

dic=defaultdict(int)
for i in range(n):dic[a[i]]+=1

ans=0
for i in range(a[-1]):
    now=i+1
    cnt=0
    # print(i)
    while now<=a[-1]:
        cnt+=dic[a[i]]
        now+=i+1
    if cnt>1:
        ans=i+1

if ans!=1:
    print(sc)
else:
    print(pc)
# print(ans)

### FIXED CODE ###

import bisect, copy, heapq, math, sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
def celi(a,b):
    return -(-a//b)
sys.setrecursionlimit(5000000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

n=int(input())
a=list(map(int,input().split()))
pc="pairwise coprime"
sc="setwise coprime"
nc="not coprime"

tmp=a[0]
for i in range(n):
    tmp=math.gcd(tmp,a[i])
if tmp!=1:
    print(nc)
    exit()

a.sort()

def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]

def factorize(N,prime_list):  # prime_listに素数のリストをぶち込め！
    lst = []
    for p in prime_list:
        if p * p > N:
            break
        while N % p == 0:
            N //= p
            lst.append(p)
    if N > 1:
        lst.append(N)
    return lst

plst=primes(1000000)
dic={}
for i in range(n):
    fac=factorize(a[i],plst)
    for j in fac:
        if j in dic:
            print(sc)
            exit()
    for j in fac:
        dic[j]=1
print(pc)
n = input()
p = list(map(int, input().split()))
ans = 0
for i in p[3:]:
    if p[i] < p[i-1] < p[i-2] or p[i] > p[i-1] > p[i-2]:
        ans +=1
    else:
        continue
print(ans)


### FIXED CODE ###

n = int(input())
p = list(map(int, input().split()))
ans = 0
for i in range(1,n-1):
    if p[i+1] < p[i] < p[i-1] or p[i+1] > p[i] > p[i-1]:
        ans +=1
print(ans)
N, M = map(int, input().split())
A = list(int(i/2) for i in map(int, input().split()))
m = max(A)
A.remove(m)

for i in range(m,M+1,2*m):
	semi = True
	for j in A:
		if i not in range(j,M+1,2*j):
			semi = False
			break
	if semi:
		base = i
		break

print(int(((M // base) + 1)/2))

### FIXED CODE ###

N, M = map(int, input().split())
A = set(i//2 for i in map(int, input().split()))
B = []
for i in A:
	B = B + [0]
	while i % 2 == 0:
		i //= 2
		B[-1] += 1
if len(set(B)) == 1:
	m = max(A)
	A.remove(m)
	base = 0
	for i in range(m,M+1,2*m):
		semi = True
		for j in A:
			if i % j != 0 or (i // j) % 2 == 0:
				semi = False
				break
		if semi:
			base = i
			break
	if base == 0:
		print(0)
	else:
		print(((M // base) + 1)//2)
else:
	print(0)
difficulties, goal = map(int, input().split())

pcs = [list(map(int, input().split())) for _ in range(difficulties)]

total_problem = 0
new_dp = [0] * 1001

for d, pc in enumerate(pcs, 1):
    dp = new_dp

    problem, complete = pc
    total_problem += problem

    score = {x: x*100*d for x in range(problem)}
    score[problem] = problem * 100 * d +complete

    for i in range(1, total_problem + 1):
        for j in range(0, i + 1):
            if i - j > problem:
                continue
            else:
                new_dp[i] = max(new_dp[i], dp[d-1][j] + score[i-j])

for i, a in enumerate(new_dp):
    if a >= goal:
        print(i)
        exit()


### FIXED CODE ###

difficulties, goal = map(int, input().split())

pcs = [list(map(int, input().split())) for _ in range(difficulties)]

dp = [[0] * 1102 for _ in range(difficulties + 1)]

total_problem = 0
for d, pc in enumerate(pcs, 1):
    problem, complete = pc
    total_problem += problem

    score = {x: x*100*d for x in range(problem)}
    score[problem] = problem * 100 * d +complete

    for i in range(1, total_problem + 1):
        for j in range(0, i + 1):
            if i - j > problem:
                dp[d][i] = max(dp[d][i], dp[d - 1][j])
            else:
                dp[d][i] = max(dp[d][i], dp[d-1][j] + score[i-j])

for i, a in enumerate(dp[difficulties]):
    if a >= goal:
        print(i)
        exit()
n=int(input())
a=list(map(int,input().split()))
result = True

a_unique = list(set(a))
for i in range(n-1):
    for j in range(i+1,n):
        if a_unique[i]^a_unique[j] in a:
            pass
        else:
            result = False

a_unique = list(set(a))
if len(a_unique) > 3:
    result = False

if result == True:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

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

a_unique = list(set(a))

if n == 3:
    if a_unique[0]^a_unique[1] == a_unique[2]:
        result = True
    
elif len(a_unique) == 3:
    if a_unique[0]^a_unique[1] == a_unique[2]: 
        if a.count(a_unique[0]) == a.count(a_unique[1]) and a.count(a_unique[1]) == a.count(a_unique[2]):
            result = True

elif len(a_unique) == 1:
    if a_unique[0]^a_unique[0] == a_unique[0]:
        result = True

elif len(a_unique) == 2:
    if a_unique.count(a_unique[0]) == 1:
        if a_unique[0]^a_unique[1] == a_unique[1]:
            if a_unique[1]^a_unique[1] == a_unique[0]:
                if a.count(a_unique[0])*2 == a.count(a_unique[1]):
                    result = True
    elif  a_unique.count(a_unique[1]) == 1:
        if a_unique[0]^a_unique[1] == a_unique[0]:
            if a_unique[0]^a_unique[0] == a_unique[1]:
                if a.count(a_unique[1])*2 == a.count(a_unique[0]):
                    result = True

if len(a_unique) > 3:
    result = False    
            
if result:
    print("Yes")
else:
    print("No")
# N 個の頂点、N-1 個の辺なので K を根にした木構造に変換する

N = int(input())
T = {}
D = [None] * N
F = [True] * N

for n in range(N):
    T[n] = []

for n in range(N-1):
    a, b, c = map(int, input().split())
    a -= 1
    b -= 1
    T[a].append([b, c])
    T[b].append([b, c])

Q, K = map(int, input().split())

K -= 1

D[K] = 0
F[K] = False

L = [K]

while len(L) > 0:
    L_tmp = []
    for k in L:
        for t in T[k]:
            b, c = t
            if F[b] == True:
                D[b] = D[k] + c
                F[b] = False
                L_tmp.append(b)
    L = L_tmp

for q in range(Q):
    x, y = map(int, input().split())
    x   -= 1
    y   -= 1
    print(D[x] + D[y])


### FIXED CODE ###

# N 個の頂点、N-1 個の辺なので K を根にした木構造に変換する

N = int(input())
T = {}
D = [None] * (N+1)
F = [True] * (N+1)

for n in range(N+1):
    T[n] = []

for n in range(N-1):
    a, b, c = map(int, input().split())
    T[a].append([b, c])
    T[b].append([a, c])

Q, K = map(int, input().split())

D[K] = 0
F[K] = False

L = [K]

while len(L) > 0:
    L_tmp = []
    for k in L:
        for t in T[k]:
            b, c = t
            if F[b] == True:
                D[b] = D[k] + c
                F[b] = False
                L_tmp.append(b)
    L = L_tmp

for q in range(Q):
    x, y = map(int, input().split())
    print(D[x] + D[y])
from itertools import accumulate
n,k = map(int,input().split())
a = list(map(int,input().split()))
a.sort()
acc = list(accumulate(a))

def maxsum(ls,k):
  l = len(ls)
  if l==0:
    return 0
  dp = [0 for i in range(l+1)]
  dp[0] = 1
  for i in range(1,l+1):
    dp[i] = dp[i-1]|(dp[i-1]<<ls[i-1])
  for b in range(k-1,-1,-1):
    if dp[-1] & 1<<b:
      return b

for i in range(n):
  if a[i]>=k:
    a = a[:i]
    break
n = len(a)
if acc[n-1] < k:
  print(n)
  exit()
sepa=[]
for i in range(n-1):
  if acc[i]<a[i+1]:
    sepa.append(i)
m=len(sepa)
l = 0
r = m-1
while l<r:
  mid = (l+r)//2
  x=sepa[mid]
  sumx = acc[x]
  if maxsum(a[x+1:],k)+sumx >= k:
    r = mid
  else:
    l = mid+1
print(sepa[r]+1)

### FIXED CODE ###

from itertools import accumulate
n,k = map(int,input().split())
a = list(map(int,input().split()))
a.sort()
acc = list(accumulate(a))

def maxsum(ls,k):
  l = len(ls)
  if l==0:
    return 0
  dp = [0 for i in range(l+1)]
  dp[0] = 1
  for i in range(1,l+1):
    dp[i] = (dp[i-1]|(dp[i-1]<<ls[i-1]))&((1<<k)-1)
  for b in range(k-1,-1,-1):
    if dp[l] & 1<<b:
      return b

for i in range(n):
  if a[i]>=k:
    a = a[:i]
    break
n = len(a)
if acc[n-1] < k:
  print(n)
  exit()
sepa=[]
for i in range(n-1):
  if acc[i]<a[i+1]:
    sepa.append(i)
m=len(sepa)
if m==0:
  print(0)
  exit()
lf = 0
r = m-1
while lf<r:
  mid = (lf+r)//2
  x=sepa[mid]
  sumx = acc[x]
  if maxsum(a[x+1:],k)+sumx >= k:
    r = mid
  else:
    lf = mid+1
if r==0:
  t=sepa[0]
  if maxsum(a[t+1:],k)+acc[t]>=k:
    print(0)
  else:
    print(sepa[r]+1)
else:
  print(sepa[r]+1)
N,A,B = map(int,input().split())
    #Aが青
    #Bが赤
    i = N // (A+B)
    b = i*A
    t = N % (A+B)

    if t > A:
        t = A

    print(b+t)

### FIXED CODE ###

N,A,B = map(int,input().split())
#Aが青
#Bが赤
i = N // (A+B)
b = i*A
t = N % (A+B)
if t > A:
   t = A
print(b+t)
N = int(input())
A = list(map(int, input().split(' ')))


B = list(set(A))

while B:
    b = max(B)
    if A.count(b) >= 4:
        print(b**2)
        exit()
    elif A.count(b) >=2:
        B.remove(b)
        while B:
            c = max(B)
            if  A.count(c) >= 2:
                print(b*c)
                exit()
            else:
                B.remove(c)
    else:
        B.remove(c)

print(0)


### FIXED CODE ###

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

x = 0
y = 0
S = set()

for a in A:
    if a in S:
        if a < x:
            continue
        elif a > y:
            x = y
            y = a
        else:
            x = a
        S.remove(a)
    else:
        S.add(a)

print(x*y)
num = int(input())

if num = 1:
  print(1)
else:
  print(num**3)

### FIXED CODE ###

num = int(input())
 
if num == 1:
  print(1)
else:
  print(num**3)
N = input()

if N in 7:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

N = str(input())

if '7' in N:
  print('Yes')
else:
  print('No')