Harryxun/stf_run huggingface dataset:
def check(x, A, K):
    import math
    sumA = 0
    for a in A:
        if a > x:
            sumA += math.ceil(a / x) - 1
    if sumA <= K:
        return True
    else:
        return False


def resolve():
    import bisect
    N, K = [int(i) for i in input().split()]
    A = [int(i) for i in input().split()]

    ok = max(A)  # maxVal when minimize
    ng = -1  # maxVal when maximize
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if check(mid, A, K):
            ok = mid
        else:
            ng = mid
    print(ok)


resolve()

### FIXED CODE ###

def check(x, A, K):
    import math
    sumA = 0
    for a in A:
        if a > x:
            sumA += math.ceil(a / x) - 1
    if sumA <= K:
        return True
    else:
        return False


def resolve():
    _, K = [int(i) for i in input().split()]
    A = [int(i) for i in input().split()]

    ok = max(A)  # maxVal when minimize
    ng = -1  # maxVal when maximize
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if mid > 0 and check(mid, A, K):
            ok = mid
        else:
            ng = mid
    print(ok)


resolve()
n = int(input())
A = int(input())
B = int(input())

if n == 1:
    print("Hello World")
else :
    print(A+B)

### FIXED CODE ###

n = int(input())


if n == 1:
    print("Hello World")
else :
    A = int(input())
    B = int(input())
    print(A+B)
A = int(input())
print(A/3600,":",(A%3600)/60,":",A%60))


### FIXED CODE ###

A = int(input())
print("%d:%d:%d"%(A/3600,(A%3600)/60,A%60))
P = int(input())
Q = int(input())
R = int(input())

Ans1 = P + Q
Ans2 = Q + R
Ans3 = R + P

if(Ans1 > Ans2):
	Ans1 = Ans2

if(Ans1 > Ans3):
	Ans1 = Ans3

print (Ans1)


### FIXED CODE ###

P,Q,R = map(int,input().split())

Ans1 = P + Q
Ans2 = Q + R
Ans3 = R + P

if(Ans1 > Ans2):
	Ans1 = Ans2

if(Ans1 > Ans3):
	Ans1 = Ans3

print (Ans1)
N = int(input())
ans = ''

while True:
    if N <= 26**i:
        N -= 1
        for j i in range(N):
            ans += chr(ord('a') + N%26)
            N //= 26
        break
    else:
        N -= 26 ** i
print(ans[::-1])

### FIXED CODE ###

N = int(input())
ans = ''

i = 1
while True:
    if N <= 26**i:
        N -= 1
        for j in range(i):
            ans += chr(ord('a') + N%26)
            N //= 26
        break
    else:
        N -= 26 ** i
    i+=1
print(ans[::-1])
n = int(input())
dic = {}
for i in range(n):
  s = input()
  if s not in dic: dic[s] = 1
  else: dic[s] += 1
v = dic.values()
v = sorted(v)
max_num = v[n-1]
ans = []
for s in dic:
  if dic[s]==max_num:
    ans.append(s)
ans = sorted(ans)
for i in range(len(ans)):
  print(ans[i])


### FIXED CODE ###

n = int(input())

dic = {}

for i in range(n):
  word = input()
  if word not in dic:
    dic[word] = 1
  else:
    dic[word] += 1
    
max_num = max(dic[word] for word in dic)
l = []
for word in dic:
  if dic[word]==max_num:
    l.append(word)
    
l = sorted(l)
for i in range(len(l)):
  print(l[i])
[A,B,C,D] = list(map(int,input().split()))
#print(C,D)
#both
import math
f=math.gcd(C,D)
f2=C*D//f
#print(f2)

both=B//f2 - (A-1)//f2
#print('both', both)

#C
Ccount=B//C - (A-1)//C
#print('C', Ccount)

#D
Dcount=B//D - (A-1)//D
#print('D', Dcount)

print(B-A+1 -(Ccount+Dcount-both))

### FIXED CODE ###


[A,B,C,D] = list(map(int,input().split()))
#print(C,D)
#both
import fractions
f=fractions.gcd(C,D)
f2=C*D//f
#print(f2)

both=B//f2 - (A-1)//f2
#print('both', both)

#C
Ccount=B//C - (A-1)//C
#print('C', Ccount)

#D
Dcount=B//D - (A-1)//D
#print('D', Dcount)

print(B-A+1 -(Ccount+Dcount-both))
N = int(input())
A = list(map(int, input().split()))
if N == 1:
    print("Yes")
else:
    k = 0
    for i in range (N-1):
        if A[N-1 -i] < A[N-2-i]:
            if (A[N-2-i] - A[N-1-i]) == 1:
                A[N-2-i] -= 1
            else:
                k = 114514
                break
if k == 114514:
    print("No")
else:
    print("Yes")             

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
ans = 0
for i in range(N-1):
  if ans > A[i+1]:
    print('No')
    exit()
  if A[i+1]-A[i] >= -1:
    ans = max(A[i+1]-1,A[i]-1,ans)
    if A[i+1] >= A[i] and A[i+1] > ans :
      A[i+1] -=1
  else:
    print('No')
    exit()
print('Yes')
r = int(input())
a = r[0]
b = r[1]
c = r[2]
d = r[3]
if a+b+c+d ==7:
  print(a+"+"+b+"+"+c+"+"+d"=7")
elif a+b+c-d ==7:
  print(a+"+"+b+"+"+c+"-"+d"=7")
elif a+b-c+d ==7:
  print(a+"+"+b+"-"+c+"+"+d"=7")
elif a+b-c-d ==7:
  print(a+"+"+b+"-"+c+"-"+d"=7")
elif a-b+c+d ==7:
  print(a+"-"+b+"+"+c+"+"+d"=7")
elif a-b+c-d ==7:
  print(a+"-"+b+"+"+c+"-"+d"=7")
elif a-b-c+d ==7:
  print(a+"-"+b+"-"+c+"+"+d"=7")
else:
  print(a+"-"+b+"-"+c+"-"+d"=7")

### FIXED CODE ###

a=input()
A=a[0]
b=a[1]
c=a[2]
d=a[3]
if A==b and b==c:
  print("Yes")
elif b==c and c==d:
  print("Yes")
else:
  print("No")
import sys
def input():
    return sys.stdin.readline()[:-1]
N, M = map(int, input().split())
es = [[] for i in range(N+1)]
edge = [None] * M
h = [0] * (N+1)
for id in range(M):
    a, b = map(int, input().split())
    es[a].append([b, id])
    edge[id] = [a, b]
    h[a] += 1

def rev(v, p, t, visit):
    if v == t:
        return True
    visit[v] = 0
    for i, (u, id) in enumerate(es[v]):
        if u != -1 and visit[u] and rev(u, v, t, visit):
            es[v][i] = [-1, id]
            es[u].append([v, id])
            edge[id] = [u, v]
            h[v] -= 1
            h[u] += 1

ps, pt, s, t = 0, 0, 0, 0
for i in range(N):
    for v in range(t+1, N+1):
        if h[v] % 2:
            s = v
            break
    if s == ps:
        break
    for v in range(s+1, N+1):
        if h[v] % 2:
            t = v
            break
    if t == pt:
        print(-1)
        quit()
    rev(s, -1, t, [1] * (N+1))
    ps, pt = s, t
for u, v in edge:
    print(u, v)


### FIXED CODE ###

from heapq import *
import sys
sys.setrecursionlimit(1000000)
def input():
    return sys.stdin.readline()[:-1]
N, M = map(int, input().split())
es = [[] for i in range(N+1)]
for id in range(M):
    a, b = map(int, input().split())
    es[a].append([b, id])
    es[b].append([a, id])
edge = [None] * M
h = [0] * (N+1)
lev = [None] * (N+1)
visit = [0] * (N+1)
def dfs(v, d):
    if visit[v]: return
    lev[v] = d
    visit[v] = 1
    for u, id in es[v]:
        if edge[id] == None:
            edge[id] = [v, u]
            h[v] ^= 1
            dfs(u, d+1)
dfs(1, 0)
q = [(-lev[v], v) for v in range(1, N+1)]
heapify(q)
while q:
    lv, v = heappop(q)
    lv = -lv
    if h[v] % 2 == 0: continue
    for u, id in es[v]:
        if lev[u] < lv:
            h[v] ^= 1
            h[u] ^= 1
            k, l = edge[id]
            edge[id] = [l, k]
            break
if h[1]:
    print(-1)
else:
    for u, v in edge:
        print(u, v)
n,m,c=map(int,input().split())
count=0
for i in range(m):
    b=list(map(int,input().split()))
for j in range(n):
    a=list(map(int,input().split()))
    combined=[x*y for (x,y) in zip(a,b)]
    if sum(combined)>c:
        count+=1
print(count)
    


### FIXED CODE ###

n,m,c=map(int,input().split())
b=list(map(int,input().split()))
count=0
for i in range(n):
    p=c
    a=list(map(int,input().split()))
    for j in range(m):
        p+=a[j]*b[j]
    if p>0:
        count+=1
print(count)
global r

def checker(x1,y1,x2,y2,xp,yp):
	vec = (x2 - x1) * (yp - y1) - (y2 - y1) * (xp - x1)
	if vec > 0:
		return 1
	elif vec < 0:
		return -1

while True:
	try:
		x1,y1,x2,y2,x3,y3,xp,yp = map(float,raw_input().split())
		r = 0
		r = r + checker(x1,y1,x2,y2,xp,yp)
		r = r + checker(x2, y2, x3, y3, xp, yp)
		r = r + checker(x3, y3, x1, y1, xp, yp)
		if r == 3 or r == -3:
			print("YES")
		else:
			print("NO")
	except EOFError:
		break

### FIXED CODE ###

def checker(x1,y1,x2,y2,xp,yp):
	r = 0
	vec = (x2 - x1) * (yp - y1) - (y2 - y1) * (xp - x1)
	if vec > 0:
		r = 1
	elif vec < 0:
		r = -1
	return r

if __name__ == '__main__':
	while True:
		try:
			x1,y1,x2,y2,x3,y3,xp,yp = map(float,raw_input().split())
			r = 0
			r += int(checker(x1,y1,x2,y2,xp,yp))
			r += int(checker(x2, y2, x3, y3, xp, yp))
			r += int(checker(x3, y3, x1, y1, xp, yp))
			if r == 3 or r == -3:
				print("YES")
			else:
				print("NO")
		except EOFError:
			break
Sp = [1,2,3,4,5,6,7,8,9,10,11,12,13]
Hu = [1,2,3,4,5,6,7,8,9,10,11,12,13]
Cr = [1,2,3,4,5,6,7,8,9,10,11,12,13]
Dy = [1,2,3,4,5,6,7,8,9,10,11,12,13]
 
num = int(input())
i = 0
 
while i < num:
     suit, n = raw_input().split()
     n = int(n)
     if suit == "S":
        Sp[n-1] = 0
     elif suit == "H":
        Hu[n-1] = 0
     elif suit == "C":
        Cr[n-1] = 0
     else:
        Dy[n-1] = 0
     i += 1
 
for i in Sp:
    if i != 0:
        print "S", i
 
for i in Hu:
    if i != 0:
        print "H", i
 
for i in Cr:
    if i != 0:
        print "C", i
 
for i in Dy:
    if i != 0:
        print "D", i



### FIXED CODE ###

alphabet = [0]*26
i = 0;
for j in range(97,123):
    alphabet[i] = chr(j)
    i += 1
al_count = [0]*26
while True :
    try :
        words = raw_input().lower().split()
        for k in words :
            for l in list(k):
                if l=='a':
                    al_count[0] += 1
                elif l=='b':
                    al_count[1] += 1
                elif l=='c':
                    al_count[2]+=1  
                elif l=='d':
                    al_count[3] += 1
                elif l=='e':
                    al_count[4]+=1
                elif l=='f':
                    al_count[5] += 1
                elif l=='g':
                    al_count[6]+=1
                elif l=='h':
                    al_count[7] += 1
                elif l=='i':
                    al_count[8]+=1
                elif l=='j':
                    al_count[9] += 1
                elif l=='k':
                    al_count[10]+=1 
                elif l=='l':
                    al_count[11] += 1
                elif l=='m':
                    al_count[12]+=1 
                elif l=='n':
                    al_count[13] += 1
                elif l=='o':
                    al_count[14]+=1
                elif l=='p':
                    al_count[15] += 1
                elif l=='q':
                    al_count[16]+=1
                elif l=='r':
                    al_count[17] += 1
                elif l=='s':
                    al_count[18]+=1
                elif l=='t':
                    al_count[19] += 1
                elif l=='u':
                    al_count[20]+=1
                elif l=='v':
                    al_count[21]+=1
                elif l=='w':
                    al_count[22] += 1
                elif l=='x':
                    al_count[23]+=1
                elif l=='y':
                    al_count[24] += 1
                elif l=='z':
                    al_count[25]+=1
    except :
        break
for i in range(26):
    print '%c : %d' %(alphabet[i],al_count[i])
n, m = map(int, input().split())
li = []
for i in range(m):
    li.append(int(input()))


def fib(dan):
    if dan == 1:
        return 1
    elif dan == 2:
        return 1
    elif dan == 0:
        return 0
    else:
        a1 = 1
        a2 = 1
        a3 = 0
        for _ in range(dan-2):
            a3 = a1 + a2 1000000007
            a1 = a2 % 1000000007
            a2 = a3 % 1000000007

        return a3



if m != 0:
    ans = fib(li[0]) % 1000000007
    for i in range(m-1):
        ans = ans * fib(li[i+1] - li[i] - 1 ) % 1000000007

    ans = ans * fib(n - li[m-1]) % 1000000007
    print(ans)

else:
    print(fib(n))





### FIXED CODE ###

n, m = map(int, input().split())
li = []
for i in range(m):
    li.append(int(input()))


def fib(dan):
    if dan == 1:
        return 1
    elif dan == 2:
        return 1
    elif dan == 0:
        return 0
    else:
        a1 = 1
        a2 = 1
        a3 = 0
        for _ in range(dan-2):
            a3 = (a1 + a2) % 1000000007
            a1 = a2 % 1000000007
            a2 = a3 % 1000000007

        return a3



if m != 0:
    ans = fib(li[0]) % 1000000007
    for i in range(m-1):
        ans = ans * fib(li[i+1] - li[i] - 1 ) % 1000000007

    ans = ans * fib(n - li[m-1]) % 1000000007
    print(ans)

else:
    print(fib(n+1))
n,k=map(int,input().split())
l=list(input())
m=0
for i in range(1,n-1):
  if l[i]=="R":
    if l[i+1]=="R":
      m+=1
  if l[i]=="L":
    if l[i-1]=="L":
      m+=1
if l[0]=="R" and l[0]==l[1]:
  m+=1
if l[-1]=="L" and l[-2]==l[-1]:
  m+=1
print(min(m+k*2,n-1))

### FIXED CODE ###

n,k=map(int,input().split())
l=list(input())
s=l[0]
m=0
c=1
for i in range(1,n):
  if l[i]!=s:
    c+=1
    s=l[i]
if c//2<=k:
  print(n-1)
else:
  for i in range(1,n-1):
    if l[i]=="R":
      if l[i+1]=="R":
        m+=1
    if l[i]=="L":
      if l[i-1]=="L":
        m+=1
  if l[0]=="R" and l[0]==l[1]:
    m+=1
  if l[-1]=="L" and l[-2]==l[-1]:
    m+=1
  print(m+k*2)
N,W=[int(i) for i in input().split()]
w=[]
v=[]
for i in range(N):
    a,b=[int(i) for i in input().split()]
    w.append(a)
    v.append(b)
dic={}
for i in range(N):
    dic[v[i]]=w[i]
v.sort()
val=0
wei=0
i=N-1
while wei<W:
    if wei+dic[v[i]]<=W:
         wei+=dic[v[i]]
         val+=v[i]
    i-=1
print(val)
    
    
    
    
    
        
    


### FIXED CODE ###

def read_int():
    return int(input().strip())
 
 
def read_ints():
    return list(map(int, input().strip().split(' ')))
 
 
def solve():
    """
    OPT[N][W] = maximum value obtained with first N items and weights up to W
    OPT[N][W] = max(OPT[N-1][W-w[N]]+v[N], OPT[N-1][W])
    OPT[0][0] = 0
    """
    N, W = read_ints()
    w, v = [], []
    for _ in range(N):
        w0, v0 = read_ints()
        w.append(w0)
        v.append(v0)
    OPT = [[0]*(W+1) for _ in range(N+1)]
    for i in range(1,N+1):
        for j in range(1,W+1):
            OPT[i][j]=OPT[i-1][j]
            if j-w[i-1]>=0:
                OPT[i][j]=max(OPT[i][j],OPT[i-1][j-w[i-1]]+v[i-1])
    return OPT[-1][-1]
if __name__ == '__main__':
    print(solve())
n,k= map(int,input().split())
Xl = list(map(int,input().split()))
from collections import Counter
Xdic = Counter(xl)
valuelist = sorted(list(Xdic.values(), reverse=True))
print(sum(valuelist[k:]))

### FIXED CODE ###

n,k= map(int,input().split())
Xl = list(map(int,input().split()))
from collections import Counter
Xdic = Counter(Xl)
valuelist = sorted(list(Xdic.values()), reverse=True)
print(sum(valuelist[k:]))
f = lambda:map(int, input().split())

h, w, n = f()
d={}
while n:
    n -= 1
    x, y = f()
    for i in range(9):
        a = (x + i % 3, y + i // 3)
        d[a] = d.get(a, 0) + (h >= a[0] > 2 <a[1] <= w)
    c = [list(d.values()).count(i + 1) for i in range(9)]

print((h - 2) * (w - 2) - sum(c), *c)


### FIXED CODE ###

#in1 = '4 5 8'
#in2 = ['1 1', '1 4', '1 5', '2 3', '3 1', '3 2', '3 4', '4 4']
#in1 = '10 10 20'
#in2 = ['1 1', '1 4', '1 9', '2 5', '3 10', '4 2', '4 7', '5 9', '6 4', '6 6', '6 7', '7 1', '7 3', '7 7', '8 1', '8 5', '8 10', '9 2', '10 4', '10 9']
#in1 = '1000000000 1000000000 0'
#h, w, n = map(int, in1.split())
h, w, n = map(int, input().split())

idx1 = 0
ab = [[0 for i in range(2)] for j in range(n)]

black_cnt = [0] * 10
black_cnt[0] = (h - 2) * (w - 2)

if n != 0:
    while idx1 < n:
        x = input().split()
        #x = in2[idx1].split()
        ab[idx1] = [int(x[0]), int(x[1])]
        idx1 += 1

    myDict = {}
    for abitem in ab:
        if abitem[0] < 3:
            sr = 0
        else:
            sr = abitem[0] - 3
        if abitem[0] > h - 3:
            lr = h - 2
        else:
            lr = abitem[0]
        if abitem[1] < 3:
            sc = 0
        else:
            sc = abitem[1] - 3
        if abitem[1] > w - 3:
            lc = w - 2
        else:
            lc = abitem[1]

        for nowRow in range(sr, lr):
            for nowCol in range(sc, lc):
                key = str(nowRow) + ',' + str(nowCol)
                if key in myDict:
                    myDict[key] += 1
                else:
                    myDict[key] = 1

    for bcnt in myDict.values():
        black_cnt[bcnt] += 1
        black_cnt[0]    -= 1

for item in black_cnt:
    print(item)
N=int(input())
def ok(h,n,w,N):
    if 4*h*n*w==N*(n*w+n*h+h*w):
        return 1
    else:
        return 0

def kiyaku(a,b):
    if b%a==0:
        return 1
    else:
        return 0

def solve(N):

    for i in range(N//4+1,3*N//4+1):
        for j in range(3*N//4+1,3501):
            if kiyaku(4*i*j-N*(i+j),N*i*j) and 4*i*j-N*(i+j)>0:
                return (i,j,N*i*j//(4*i*j-N*(i+j)))

    return (-1,-1,-1)
h,n,w=solve(N)
print(h,n,w)

### FIXED CODE ###

N=int(input())
def ok(h,n,w,N):
    if 4*h*n*w==N*(n*w+n*h+h*w):
        return 1
    else:
        return 0

def kiyaku(a,b):
    if b%a==0:
        return 1
    else:
        return 0

def solve(N):

    for i in range(N//4+1,3*N//4+1):
        for j in range(3*N//4+1,3501):
            if 4*i*j-N*(i+j)>0 and kiyaku(4*i*j-N*(i+j),N*i*j):
                return (i,j,N*i*j//(4*i*j-N*(i+j)))
h,n,w=solve(N)
print(h,n,w)
a,b = map(int,input().split())

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')
n,x=map(int,input().split())

def makeBurger(n):
    if n==1:
        return [1,3,1]
    else:
        burger=makeBurger(n-1)
        newBurger=[*burger,1,*burger]
        newBurger[0]+=1
        newBurger[-1]+=1
        print(newBurger)
        return newBurger

burger=makeBurger(n)
size=0
index=0
cnt=0
while size<=x:
    layerSize=burger[index]
    if index%2:
        if size+layerSize>x:
            cnt+=x-size
            break
        else:
            cnt+=layerSize
    size+=layerSize
    index+=1
print(cnt)

### FIXED CODE ###

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

thickness=[1]
for i in range(1,n):
    thickness.append(2*thickness[i-1]+3)
patty=[1]
for i in range(1,n):
    patty.append(2*patty[i-1]+1)


def pattyCnt(n,x):
    if n==0:
        return 0 if x<=0 else 1
    elif x<=1+thickness[n-1]:
        return pattyCnt(n-1,x-1)
    else:
        return patty[n-1]+1+pattyCnt(n-1,x-2-thickness[n-1])

print(pattyCnt(n,x))
a,b,c,d = list(map(int,input()))
ans = "No"
if abs(a-c) < d:
  ans = "Yes"
elif abs(a-b) < d and abs(b-c) < d:
  ans = "Yes"
print(ans)


### FIXED CODE ###

a,b,c,d = list(map(int,input().split()))
ans = "No"
if abs(a-c) <= d:
  ans = "Yes"
elif abs(a-b) <= d and abs(b-c) <= d:
  ans = "Yes"
print(ans)
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    p = list(map(int, input().split()))

    ans = 0
    i = 0
    while i < N:
        if i+1 == p[i]:
            tmp = p[i]
            p[i] = p[i+1]
            p[i+1] = tmp
            ans += 1
            i += 1
        i += 1
    print(ans)

if __name__ == "__main__":
    main()

### FIXED CODE ###

# import sys
# input = sys.stdin.readline

def main():
    N = int(input())
    p = list(map(int, input().split())) + [N+1]

    ans = 0
    i = 1
    for i in range(N):
        if i+1 == p[i]:
            tmp = p[i]
            p[i] = p[i+1]
            p[i+1] = tmp
            ans += 1
    print(ans)

if __name__ == "__main__":
    main()
from operator import mul
from functools import reduce

n, m = [int(i) for i in input().split()]
arr = [int(input()) for i in range(m)]
arr.append(n+1)
arr.insert(0, -1)
div_arr = [arr[i+1]-arr[i]-1 for i in range(len(arr)-1)]


def Fib(n):
    a, b = 0, 1
    if n == 1:
        return a
    elif n == 2:
        return b
    else:
        for i in range(n-2):
            a, b = b, a + b
        return b

if 0 in div_arr:
  print(0)
else:
  print(reduce(mul, [Fib(i+1) for i in div_arr])%1000000007)

### FIXED CODE ###

import itertools

arr = [int(i) for i in input().split()]
arrs = list(itertools.combinations(arr,2))
sum_arr = [sum(com) for com in arrs]

print(min(sum_arr))
number = input().split(" ")
N = int(number[0])
K = int(number[1])

numbers = input().split(" ")
numbers.sotr()

a = 0

for i in range(K):
	a += numbers[i]
print(a)

### FIXED CODE ###

number = input().split(" ")
N = int(number[0])
K = int(number[1])
 
list = []
numbers = input().split(" ")
for i in numbers:
    list.append(int(i))
list.sort()
 
a = 0
 
for i in range(K):
	a += int(list[i])
print(a)
n = int(input()
a = list(map(int, input().split()))
b = list(map(int, input().split()))
ans = 0

for i in range(n):
    if a[i] + a[i + 1] < b[i]:
        ans += a[i] + a[i + 1]
        a[i + 1] = 0
    else:
        ans += b[i]
        if a[i] < b[i]:
            a[i + 1] -= b[i] - a[i]

print(ans)


### FIXED CODE ###

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

for i in range(n):
    if a[i] + a[i + 1] < b[i]:
        ans += a[i] + a[i + 1]
        a[i + 1] = 0
    else:
        ans += b[i]
        if a[i] < b[i]:
            a[i + 1] -= b[i] - a[i]

print(ans)
N, K = map(int, input().split())
S = str(input())

L = [0]
for i in range(len(S)-1):
#     print(S[i],S[i+1])
    if S[i] != S[i+1]:
        L.append(i+1)
L.append(len(S))
# print(L)

ans = 1
if N > K * 3:
    for i in range(len(L)-K*2-1):
        ans = max(ans, L[i+K*3-1]-L[i])
    print(ans)
    print("Yes")
else:
    print(len(S))

### FIXED CODE ###

N, K = map(int, input().split())
S = list(str(input()))

count = 1
L = []
L.append(0)
for i in range(N):
    if i < N-1:
        if S[i] == S[i+1]:
            count += 1
        else:
            L.append(count)
            count = 1
    else:
        L.append(count)
        count = 1
L.append(0)

if S[0] == '1':
    ans = 0
    tmp = 0
    dist = 2 * (K + 1)
    for i in range(len(L)):
        tmp += L[i]
        if i % 2 == 1:
            if i - dist >= 0:
                tmp -= L[i-dist]
                tmp -= L[i-dist+1]
            ans = max(ans, tmp)
        else:
            if i == N - 1:
                ans = max(ans, tmp)
    print(ans)

if S[0] == '0':
    ans = 0
    tmp = 0
    dist = 2 * (K + 1)
    for i in range(len(L)):
        tmp += L[i]
        if i % 2 == 0:
            if i - dist + 1 >= 0:
                tmp -= L[i-dist+1]
            if i - dist >= 0:
                tmp -= L[i-dist]
            ans = max(ans, tmp)
        else:
            if i == N - 1:
                ans = max(ans, tmp)
    print(ans)
n=int(input())
for i in range(1000,10001,1000):
	num=i-n
	if num >=0:
      print(num)
      break

### FIXED CODE ###


n=int(input())
for i in range(1000,10001,1000):
	num=i-n
	if num >=0:
		print(num)
		break
b = int(input())
h = int(input())

print((a+b)*h/2)

### FIXED CODE ###

a = int(input())
b = int(input())
h = int(input())

print((a+b)*h//2)
def gcd(x, y):
    r = 1
    for i in range(1, min(x, y)):
        if x % i == 0 and y % i == 0:
            r = i
    return r

x, y = map(int, re.split(' ', raw_input()))
print('%d %d' % (x, y ))
#print(gcd(x, y))

### FIXED CODE ###

import re

def gcd(x, y):
    if x == y:
        return x
    if x < y and y % x == 0:
        return x
    if x > y and x % y == 0:
        return y
    if x <= y:
        m = y % x
        return gcd(x, m)
    if x >= y:
        m = x % y
        return gcd(y, m)

    l = list(range(1, int(min(x, y) / 2) + 1))
    l.reverse()
    r = 1
    for i in l:
        if x % i == 0 and y % i == 0:
            return i
    return 1
 
x, y = map(int, re.split(' ', raw_input()))
print(gcd(x, y))
int N = input()
d[]= map(int, input().split())

answer = 0

for x in N:
  for y in N-1:
    w = d[x]*d[y]/2
    answer += w

print(answer)


### FIXED CODE ###

N = int(input())
d = [int(x) for x in input().split()]

f = sum(d)
s = 0

for i in d:
  s += i * (f-i)
print(s//2)
n,T=map(int,input().split())
data=[input().split() for i in range(n)]
lc=[]
for row in data:
    if int(row[1]) <=T:
        lc.append(int(row[0]))

if not lc:
    print("TLE")
else:
    a=sorted(lc)
    print(a[0])

### FIXED CODE ###

n=int(input())
if n==1:
    print("Hello World")
else:
    a=int(input())
    b=int(input())
    print(a+b)