Harryxun/stf_run huggingface dataset:
import math
a,b = map(int, input().split())
print(math.ceil((a+b)/2a))

### FIXED CODE ###

import math
a,b = map(int, input().split())
x = (a + b) / 2
print(math.ceil(x))
a,b,c,d,e,f = map(int,input().split())

syokuen=[]

for i in range(1500//a):
  for j in range(1500//b):
    if c*i+d*j not in syokuen and c*i+d*j <=1500 :
      syokuen.append(c*i+d*j) 

mizu=[]
for i in range(30):
  for j in range(30):
      if a*i*100 + b*j*100 not in mizu and a*i*100 + b*j*100<=f:
        mizu.append(a*i*100 + b*j*100)
        
noudo_max = 0.0
for i in range(len(syokuen)):
  for j in range(len(mizu)):
    if mizu[j]+syokuen[i] != 0:
      noudo = syokuen[i]/(mizu[j]+syokuen[i])
      if mizu[j]+syokuen[i] <= f and noudo <= e/(100+e) and noudo > noudo_max:
        noudo_max = noudo
        ans_syokuen = syokuen[i]
        ans_mizu = mizu[j]

print(ans_syokuen+ans_mizu,ans_syokuen)

### FIXED CODE ###

a,b,c,d,e,f = map(int,input().split())

syokuen=[0]

if c == 1 or d == 1:
  for i in range(1500+1):
    syokuen.append(i)
else:
  for i in range(1500//a+1):
    for j in range(1500//b+1):
      if c*i+d*j not in syokuen and c*i+d*j <=1500 :
        syokuen.append(c*i+d*j) 

mizu=[0]
for i in range(30):
  for j in range(30):
      if a*i*100 + b*j*100 not in mizu and a*i*100 + b*j*100<=f:
        mizu.append(a*i*100 + b*j*100)
        
noudo_max = 0.0
for i in range(len(syokuen)):
  for j in range(len(mizu)):
    if mizu[j]+syokuen[i] != 0:
      noudo = syokuen[i]/(mizu[j]+syokuen[i])
      if mizu[j]+syokuen[i] <= f and noudo <= e/(100+e) and noudo >= noudo_max:
        noudo_max = noudo
        ans_syokuen = syokuen[i]
        ans_mizu = mizu[j]

print(ans_syokuen+ans_mizu,ans_syokuen)
#coding:utf-8
import sys
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = False
def main(input = sys.stdin.readline):
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
 
    N = II()
    info = []
    MAXL = 101
    b = [[0] * MAXL for _ in range(MAXL)]
 
    def vtop(x1,x2,y1,y2,h1):
        ans = h1 + abs(x1-x2) + abs(y1-y2)
        return ans if ans <= 10**9 else 0
 
    # get info
    initidx = -1000
    for i in range(N):
        x,y,h = LMIIS()
        info.append((x,y,h))
        if h > 0:
            initidx = i

    # init candidates
    for x,y,h in info:
        if h != 0:
            for i in range(MAXL):
                for j in range(MAXL):
                    b[i][j] = vtop(x,j,y,i,h)
        break

    # check
    for x,y,h in info:
        for i in range(MAXL):
            for j in range(MAXL):
                if h == 0:
                    if b[i][j] > vtop(x,j,y,i,h):
                        b[i][j] = 0

                else:
                    if b[i][j] != vtop(x,j,y,i,h):
                        b[i][j] = 0

    # answer
    ansl = []
    for i in range(MAXL):
        for j in range(MAXL):
            if b[i][j] > 0:
                ansl.append((j,i,b[i][j]))
    
    ansl2 = []
    for x0,y0,h0 in ansl:
        f = True
        for x1,y1,h1 in info:
            
            if max(h0-abs(x0-x1)-abs(y0-y1),0) != h1:
                f = False
                break
        if f:
            ansl2.append((x0,y0,h0))
    x,y,h= ansl2[-1]
    print(x,y,h)


if __name__ == '__main__':
    main()

### FIXED CODE ###

#coding:utf-8
import sys
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = False
def main(input = sys.stdin.readline):
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())

    N = II()
    info = []
    for _ in range(N):
        xi, yi, hi = LMIIS()
        if hi != 0:
            xt, yt, ht = xi, yi, hi
        info.append((xi, yi, hi))

    for Cy in range(101):
        for Cx in range(101):
            H = ht + abs(xt - Cx) + abs(yt - Cy)
            found = True
            for xi, yi, hi in info:
                tmp_h = max(H - abs(Cy-yi) - abs(Cx-xi), 0)
                if tmp_h != hi:
                    found = False
                    break
            if found:
                print('{} {} {}'.format(Cx,Cy,H))
                return



if __name__ == '__main__':
    main()
#!/usr/bin/python3
# -*- coding: utf-8 -*-
def euclid(a, b):
    if b == 0:
        return a
    else:
        return euclid(b, a%b)
def list_euclid(int_list):
    ans = int_list[0]
    for i in range(1,len(int_list)):
        ans = euclid(ans, int_list[i])
        if ans == 1:
            return ans
    return ans
n = int(input())
a = list(map(int, input().split()))
a.sort()
max = 0
b_int = 0
if n < 5:
  for i in range(0,n):
    if b_int == a[0]:
      p = a.pop(0)
      # a.append(p)
    else:
      p = a.pop(0)
      b_int = p
      x = list_euclid(a)
      if max < x:
        max = x
      a.append(p)
else:
  for i in range(0,n):
    if b_int == a[0]:
      p = a.pop(0)
      # a.append(p)
    else:
      p = a.pop(0)
      b_int = p
      k = len(a) // 2
      x = 0
      y = list_euclid(a[0:k])
      if y == 1:
        x = 1
      else:
        z = list_euclid(a[k:n-1])
        x = euclid(y, z)
      if max < x:
        max = x
      a.append(p)
print(max)

### FIXED CODE ###

#!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys
def gcd(a, b): #最大公約数
  while b:
    a, b = b, a % b
  return int(a)
    
n = int(input())
a = list(map(int, input().split()))
if n==2:
  print(max(a))
  sys.exit(0)
elif n==3:
  lis = [gcd(a[0], a[1]), gcd(a[1], a[2]), gcd(a[2], a[0])]
  print(max(lis))
  sys.exit(0)
tmp_unused = gcd(a[0], a[1])
tmp_used = max(a[0], a[1])
#print("used=", tmp_used, "unused=", tmp_unused)
for i in range(2,n):
  #print(a[i])
  tmp_used = max(tmp_unused, gcd(tmp_used, a[i]))
  tmp_unused = gcd(tmp_unused, a[i])
  
  #print("used=", tmp_used, "unused=", tmp_unused)
print(tmp_used)
import sys
import time
#from collections import deque, Counter, defaultdict
#from fractions import gcd
import bisect
#import heapq
import math
start=time.time()
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
inf = 10**18
MOD = 1000000007
ri = lambda : int(input())
rs = lambda : input().strip()
rl = lambda : list(map(int, input().split()))
n = rl()
a=rl()
a.sort()
b=[0]*2*10**5
ans=[]
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
for i in a:
    """
    if b[i]==1:
        if ans:
            if i in ans:
                ans.remove(i)
    """
    f=True
    for j in make_divisors(i):
        if b[j]==1:
            f=False
            break
    if f:
        b[i]=1
        ans.append(i)

print(len(ans))

### FIXED CODE ###

import sys
import time
#from collections import deque, Counter, defaultdict
#from fractions import gcd
import bisect
#import heapq
import math
start=time.time()
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
inf = 10**18
MOD = 1000000007
ri = lambda : int(input())
rs = lambda : input().strip()
rl = lambda : list(map(int, input().split()))
n = rl()
a=rl()
a.sort()
b=[0]*2*10**6
for i in a:
    if b[i]==0:
        b[i]=-1
        for j in range(2,10**6):
            if i*j>10**6:
                break
            b[i*j]+=1
        continue
    
    if b[i]==-1:
        b[i]=1
cnt = 0
for i in a:
    if b[i]==-1:
        cnt+=1
print(cnt)
import math

def overlap(p1, p2, d):
    return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d

def intersection(o1,o2):
    a  = 2*(o2[0] - o1[0])
    b  = 2*(o2[1] - o1[1])
    c  = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
    a2 = a**2 + b**2
    b2 = a*c + a*b*o1[1] - b**2*o1[0]
    c2 = b**2*(o1[0]**2 + o1[1]**2 - 1) + c**2 + 2*b*c*o1[1]
    x1 = (-b2 + math.sqrt(b2**2 - a2*c2))/a2
    x2 = (-b2 - math.sqrt(b2**2 - a2*c2))/a2
    if b < 10e-6:
        y1 = (o1[1] + o2[1])/2
        y2 = (o1[1] + o2[1])/2
    else:
        y1 = -(a*x1 + c)/b
        y2 = -(a*x2 + c)/b
    if b2**2 - a2*c2 < 10e-6:
        return [x1, y1], [None, None]
    else:
        return [x1, y1], [x2, y2]

while True:
    n = int(input())
    if n == 0:
        break
    p = []
    for i in range(n):
        p.append(list(map(float, input().split(","))))
    ans = 0
    for i in range(n - 1):
        for j in range(i + 1, n):
            if not overlap(p[i], p[j], 4):
                continue
            elif overlap(p[i], p[j], 10e-6):
                continue
            p1, p2 = intersection(p[i], p[j])
            cnt1 = 0
            cnt2 = 0
            for k in range(n):
                if overlap(p1, p[k], 1):
                    cnt1 += 1
                if p2[0] != None and overlap(p2, p[k], 1):
                    cnt2 += 1
            ans = max([ans, cnt1, cnt2])
    print(ans)



### FIXED CODE ###

import math

def dist(p1, p2):
    return math.sqrt((p1[0] - p2[0])**2 + (p1[1] - p2[1])**2)

def intersection(o1,o2):
    if dist(o1,o2) > 2:
        p1, p2 =  [None, None], [None, None]
    elif dist(o1,o2) == 2:
        p1, p2 =  [(o1[0] + o2[0])/2, (o1[1] + o2[1])/2], [None, None]
    else:
        m = [(o1[0] + o2[0])/2, (o1[1] + o2[1])/2]
        v = [m[0] - o1[0], m[1] - o1[1]]
        v_abs = dist(v,[0,0])
        w = [v[1], -v[0]]
        w_abs = dist(w,[0,0])
        n = [w[0]/w_abs, w[1]/w_abs]
        l = math.sqrt(1 - v_abs**2)
        p1 = [m[0] + l*n[0], m[1] + l*n[1]]
        p2 = [m[0] - l*n[0], m[1] - l*n[1]]
    return p1, p2
err = 1.0e-6
while True:
    n = int(input())
    if n == 0:
        break
    p = []
    for i in range(n):
        p.append(list(map(float, input().split(","))))
    ans = 1
    for i in range(n - 1):
        for j in range(i + 1, n):
            p1, p2 = intersection(p[i], p[j])
            cnt1 = 0
            cnt2 = 0
            for k in range(n):
                if p1[0] and dist(p1, p[k]) <= 1 + err:
                    cnt1 += 1
                if p2[0] and dist(p2, p[k]) <= 1 + err:
                    cnt2 += 1
            ans = max([ans, cnt1, cnt2])
    print(ans)
import sys
N, C, K = map(int, input().split())
A = list(map(int, sys.stdin.readlines()))+[10**10]
A.sort()
a, c, t = 0, 1, a[0]+k
for i in A[1:]:
    if i <= t and c < C:
        c += 1
    else:
        t, c = i + K, 1
        a += 1
 
print(a)

### FIXED CODE ###

import sys
N, C, K = map(int, input().split())
A = list(map(int, sys.stdin.readlines()))+[10**10]
A.sort()
a, c, t = 0, 1, A[0]+K
for i in A[1:]:
    if i <= t and c < C:
        c += 1
    else:
        t, c = i + K, 1
        a += 1
 
print(a)
N = int(input())
 
t = map(int, input().split())
 
M = int(input())
 
cal = sum(t)
 
for j in range(M):
    p, x = map(int, input().split())
    print(cal - t[p - 1] + x)

### FIXED CODE ###

N = int(input())
 
t = list(map(int, input().split()))
 
M = int(input())
 
cal = sum(t)
 
for j in range(M):
    p, x = map(int, input().split())
    print(cal - t[p - 1] + x)
n,k=map(int,input().split())
a=tuple(map(int,input().split()))
l=[0]
for i in range(1,n):
  b=a[i]
  l+=[min(l[-j]+abs(b-a[-j])for j in range(1,max(i,k)+1))]
print(l[-1])


### FIXED CODE ###

n,k=map(int,input().split())
a=list(map(int,input().split()))
l=[0]
for i in range(1,n):
  b=a[i]
  l.append(min(l[j]+abs(b-a[j])for j in range(i-min(k,i),i)))
print(l[-1])
lis=[]
ll=["a","b","c"]
for i in range(3):
  lis.append(list(input()))
turn=0
while 1:
  x=ll.index(lis[turn].pop())
  if lis[turn]=[]:
    print(ll[turn].upper())
    break
  turn=x

### FIXED CODE ###

lis=[]
ll=["a","b","c"]
for i in range(3):
  lis.append(list(input()))
turn=0
while 1:
  if lis[turn]==[]:
    print(ll[turn].upper())
    break
  turn=ll.index(lis[turn].pop(0))
a,b=input().split()
print(min(a*int(b),b*(int(a))) 


### FIXED CODE ###

N,M=map(int,input().split())
print("Yes" if N==M else "No")
n,w = map(int,input().split())
wv = [[int(i) for i in input().split()] for j in range(n)]

wv.sort(key=lambda x:(x[0],-x[1]))
#print(wv)
#exit()
#wv.sort()
min_v = wv[0][0]
cnt = 0
num = [0]*4

for i in range(n):
    num[wv[i][0] - wv[0][0]] +=1
        
#dp = [[[0 for i in range(n)] for j in range(n)] for k in range(n)]

#print(wv)

t_num3 = []
tmp = 0
for i in range(num[3]):
    tmp += wv[n-num[3]-1+i][1]
    t_num3.append(tmp)

t_ans = 0
t_num0 = 0
ans = 0

for i in range(num[0]+1):
    if i != 0:
        t_num0 += wv[i-1][1]
    #print(t_ans,i)
    t_num1 = 0
    for j in range(num[1]+1):
        if j != 0:
            t_num1 += wv[num[0]+j-1][1]
        t_num2 = 0
        for k in range(num[2]+1):
            if k != 0:
                t_num2 += wv[num[0]+num[1]+k-1][1]
            ima_w = min_v*(i+j+k) + 1*j+2*k
            idx = (w - ima_w)//(min_v+3) - 1
            if ima_w > w:
                continue
            elif num[3] == 0 or idx < 0:
                t_ans = t_num0+t_num1+t_num2
            else:
                t_ans = t_num0+t_num1+t_num2 + t_num3[min(idx,num[3])]
        #print(t_ans)
        ans = max(t_ans,ans)

print(ans)

### FIXED CODE ###

n,w = map(int,input().split())
wv = [[int(i) for i in input().split()] for j in range(n)]

wv.sort(key=lambda x:(x[0],-x[1]))
#print(wv)
#exit()
#wv.sort()
min_v = wv[0][0]
cnt = 0
num = [0]*4

for i in range(n):
    num[wv[i][0] - min_v] +=1
        
#dp = [[[0 for i in range(n)] for j in range(n)] for k in range(n)]

#print(wv)

t_num3 = [0]
tmp = 0
for i in range(num[3]):
    tmp += wv[n-num[3]+i][1]
    t_num3.append(tmp)

#print(t_num3)
#exit()

t_ans = 0
t_num0 = 0
ans = 0


for i in range(num[0]+1):
    if i != 0:
        t_num0 += wv[i-1][1]
    #print(t_ans,i)
    t_num1 = 0
    for j in range(num[1]+1):
        if j != 0:
            t_num1 += wv[num[0]+j-1][1]
        t_num2 = 0
        for k in range(num[2]+1):
            if k != 0:
                t_num2 += wv[num[0]+num[1]+k-1][1]
            ima_w = min_v*(i+j+k) + 1*j+2*k
            idx = (w - ima_w)//(min_v+3)
            if ima_w > w:
                break
            else:
                t_ans = t_num0+t_num1+t_num2 + t_num3[min(idx,num[3])]
        #print(t_ans)
            ans = max(t_ans,ans)

print(ans)
#! /usr/bin/python
from sys import stdin
n = int(input())
w = list(map(int, stdin.read().splitlines()))
print("Yes" if n == len(set(w)) else "No")


### FIXED CODE ###

#! /usr/bin/python
from sys import stdin
n = int(input())
W = stdin.read().splitlines()
if n != len(set(W)):
    print("No")
    exit()
for i in range(n-1):
    if W[i][-1] != W[i+1][0]:
        print("No")
        exit()
print("Yes")
n = input()
if n[0]=n[2]:
  priint('Yes')
else:
  print('No')

### FIXED CODE ###

n = input()
if n[0]==n[2]:
  print('Yes')
else:
  print('No')
N=int(input())
A=int(input())
B=int(input())
C=A+B
if N==1:
    print("Hello World")
if N==2:
    print(C)

### FIXED CODE ###

N=int(input())
if N == 1:
    print("Hello World")
if N == 2:
    A=int(input())
    B=int(input())
if N == 2:
    print(A+B)
import sys
 
def solve(N: int, M: int, P: int, A: "List[int]", B: "List[int]", C: "List[int]"):
    dist = [sys.maxsize] * (N + 1)
 
    dist[1] = 0
    for _ in range(N):
        for j in range(M):
            weight = -(C[j] - P)
            if dist[B[j]] > dist[A[j]] + weight:
                dist[B[j]] = dist[A[j]] + weight
 
    result = -dist[N]
 
    for _ in range(N + 1):
        for j in range(M):
            weight = -(C[j] - P)
            if dist[B[j]] > dist[A[j]] + weight:
                dist[B[j]] = dist[A[j]] + weight
 
    if result != -dist[N]:
        print(-1)
    else:
        print(max(-dist[N], 0))
 
 
# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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
    M = int(next(tokens))  # type: int
    P = int(next(tokens))  # type: int
    A = [int()] * (M)  # type: "List[int]"
    B = [int()] * (M)  # type: "List[int]"
    C = [int()] * (M)  # type: "List[int]"
    for i in range(M):
        A[i] = int(next(tokens))
        B[i] = int(next(tokens))
        C[i] = int(next(tokens))
    solve(N, M, P, A, B, C)
 
if __name__ == '__main__':
    main()

### FIXED CODE ###

#!/usr/bin/env python3
import sys


def solve(A: int, B: int):
    print(max(A+B, A-B, A*B))


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()
import sys
input = sys.stdin.readline

h, w, k = map(int, input().split())
s = []
for i in range(h):
    s.append(list(map(int, input())))

ans = h + w - 2
for i in range(1<<(h-1)):
    l = []
    tmp = s[0]
    for j in range(h-1):
        if i >> j & 1:
            tmp = [tmp[m] + s[j+1][m] for m in range(w)]
        else:
            l.append(tmp)
            tmp = s[j+1]
    l.append(tmp)
    c = [0] * len(l)
    cnt = 0
    flag = False
    j = 0
    while j < w:
        for m in range(len(l)):
            c[m] += l[m][j]
            if c[m] > k:
                flag = True
        if flag:
            c = [0] * len(l)
            cnt += 1
            flag = False
            j -= 1
        j += 1
    ans = min(ans, len(l) + cnt - 1)

print(ans)

### FIXED CODE ###

H, W, K = map(int, input().split())
S = [list(input()) for _ in range(H)]

res = float('inf')
for i in range(2**(H-1)):
    c = bin(i).count('1')
    cnt = c
    sum_l = [0] * (c+1)
    j = 0
    flag = True
    while j < W:
        tmp = sum_l.copy()
        pos = 0
        for k in range(H):
            if S[k][j] == '1':
                tmp[pos] += 1
            if (i >> k) & 1:
                pos += 1
        if max(tmp) <= K:
            sum_l = tmp.copy()
            j += 1
            flag = False
        else:
            if flag:
                cnt = float('inf')
                break
            cnt += 1
            flag = True
            sum_l = [0] * (c+1)

    res = min(res, cnt)

print(res)
#全部#の数を数える
#最小のルートを探し、そのルートで使ったますを数える（見つかんなかったら-1
#マスの数-最小のルートで使った歩数-最初に数えた#の数が答え
h,w= map(int,input().split())
arr = [input() for i in range(h)]
routed =  [[False for i in range(w)] for j in range(h)]
"""
arr=['.....................................',
 '...#...####...####..###...###...###..',
 '..#.#..#...#.##....#...#.#...#.#...#.',
 '..#.#..#...#.#.....#...#.#...#.#...#.',
 '.#...#.#..##.#.....#...#.#.###.#.###.',
 '.#####.####..#.....#...#..##....##...',
 '.#...#.#...#.#.....#...#.#...#.#...#.',
 '.#...#.#...#.##....#...#.#...#.#...#.',
 '.#...#.####...####..###...###...###..',
 '.....................................']

arr=['..#','#..','...']
h=3
w=3
"""
mnct=100000000
mn=[0]
cnt=0
def tansaku(x,y,cnt,mnct):
    # print(x,y,cnt)
    # print(routed)
    #この道は通った
    cnt+=1
    #ゴールに着いたら最小経路を更新してリターン
    if (x==h-1) and (y == w-1):

        # print("Goal!")
        if mnct>cnt:
            mnct= cnt
            mn[0]=mnct
        return
    #下に行ける


    if(x<h-1)and(arr[x+1][y]!='#')and(routed[x+1][y]==False):
        routed[x+1][y]=True
        tansaku(x+1,y,cnt,mnct)
        routed[x+1][y]=False
    #→にいける

    if(y<h-1)and(arr[x][y+1]!='#')and(routed[x][y+1]==False):
        routed[x][y+1]=True
        tansaku(x,y+1,cnt,mnct)
        routed[x][y+1]=False

    #左にいける
    if(y>0)and(arr[x][y-1]!='#')and(routed[x][y-1]==False):
        routed[x][y-1]=True
        tansaku(x,y-1,cnt,mnct)
        routed[x][y-1]=False
    #上にいける

    if(x>0)and(arr[x-1][y]!='#')and(routed[x-1][y]==False):
        routed[x-1][y]=True
        tansaku(x-1,y,cnt,mnct)
        routed[x-1][y]=False



    # print("Game Over!")
    return

tansaku(0,0,0,mnct)


ans=0
for i in range(0,h):
    ans+=arr[i].count('#')

print(h*w-mn[0]-ans)


### FIXED CODE ###

h,w = map(int,input().split())
s = [input() for _ in range(h)]

from collections import deque

ans = 0
stack = deque([[0,0,1]])
dxdy = [(0,1),(0,-1),(1,0),(-1,0)]
visited = [[0 for i in range(w)] for j in range(h)]
minus = 0
for i in range(h):
    for j in range(w):
        if s[i][j] == "#":
            visited[i][j] = 1
            minus += 1


ans = -1
while(stack):
    ne = stack.popleft()
    x,y = ne[0],ne[1]
    if x < 0 or x > h-1: continue
    if y < 0 or y > w-1: continue
    if visited[x][y] == 1: continue
    if x== h -1 and y == w-1:
        ans = h*w - ne[2] - minus

    visited[x][y] = 1

    for dx,dy in dxdy:
        stack.append([dx+x,dy+y,ne[2]+1])

print(ans)
n = int(input())

h = list(map(int, input().split()))

ans = []

cnt = 0
l = h[0]
for i in range(1, n):
    r = h[i]
    if l >= r:
        cnt += 1
    else:
        cnt = 0
    l = h[i]
    ans.append(cnt)

print(max(ans))

### FIXED CODE ###

n = int(input())

h = list(map(int, input().split()))

ans = [0]

cnt = 0
l = h[0]
for i in range(1, n):
    r = h[i]
    if l >= r:
        cnt += 1
    else:
        cnt = 0
    l = h[i]
    ans.append(cnt)

print(max(ans))
N = int(input())
if N%2 == 1: print("No")
else:
    S = input()
    if S[:n]==s[n:] :print("Yes")
    else:print("No")

### FIXED CODE ###

N = int(input())
S = input()
if N%2 == 1: print("No")
else:
    n=int(N/2)
    if S[:n]==S[n:] :print("Yes")
    else:print("No")
n, m = map(int, input().split())
prefers = [list(reversed(list(map(int, input().split())))) for _ in range(n)]
items = [True] * (m + 1)
competes = {i: 0 for i in range(1, m + 1)}
persons = [set() for _ in range(m + 1)]

for i, ps in enumerate(prefers):
    item = ps[-1]
    competes[item] += 1
    persons[item].add(i)

ans = m
remain = m
while ans > m // remain:
    mx = max(competes.values())
    ans = min(ans, mx)
    del_items = [a for a, k in competes.items() if k == mx]
    for a in del_items:
        items[a] = False
        del competes[a]
    for a in del_items:
        pa = persons[a]
        for p in pa:
            pf = prefers[p]
            try:
                while not items[pf[-1]]:
                    pf.pop()
            except:
                break
            item = pf[-1]
            persons[item].add(p)
            competes[item] += 1
    remain -= 1

print(ans)


### FIXED CODE ###

from collections import defaultdict
from operator import itemgetter


def sub(prefers, canceled):
    res = defaultdict(int)
    for pref in prefers:
        p = pref[-1]
        while p in canceled:
            pref.pop()
            p = pref[-1]
        res[p] += 1

    return max(res.items(), key=itemgetter(1))


def solve(m, prefers):
    canceled = set()
    ans = float('inf')
    for _ in range(m):
        s, c = sub(prefers, canceled)
        canceled.add(s)
        ans = min(ans, c)
    return ans


n, m = map(int, input().split())
prefers = [list(reversed(list(map(int, input().split())))) for _ in range(n)]

print(solve(m, prefers))
N,M = map(int,input().split())
A = list(map(int,input().split()))
A.sort(reverse = True)
if A[M-1] < sum(A)/4/M:
  print("No")
else:
  print("Yes")

### FIXED CODE ###

A,B,K = map(int,input().split())
L = []
for i in range(1,101):
  if A % i == 0 and B % i == 0:
    L.append(i)
S = sorted(L, reverse = True)
print(S[K-1])
N, M = list(map(int, input().split())) #問題数(リストサイズ）と提出数（ループ回数）を受ける
list_WA = [0] * N
list_Flag = [0] * N
for i in range(M):
  a, b = list(map(int, input().split()))
  if list_Flag[a-1] == 1:
	pass
  else:
    if b=='WA':
      list_WA[a-1]=list_WA[a-1]+1
    else:
      list_Flag[a-1]=list_Flag[a-1]+1
WA=sum(list_WA)
AC=sum(list_Flag)
ans=[AC,WA]
print(' '.join(map(str, ans)))

### FIXED CODE ###

N, M = list(map(int, input().split()))
list_WA = [0] * N
list_Flag = [0] * N
for i in range(M):
  a, b = list(map(str, input().split()))
  a=int(a)
  if not list_Flag[a-1] == 1:
    if b=='WA':
      list_WA[a-1]=list_WA[a-1]+1
    elif b=='AC':
      list_Flag[a-1]=1
penalty = [0] * N
for p in range(N):
    penalty[p]=list_WA[p]*list_Flag[p]
PE=sum(penalty)
AC=sum(list_Flag)
print(AC,PE)
A,B,C = map(int,input().split())
answer=B+C-A
if answer>=0
  print(answer)
else print(0)

### FIXED CODE ###

A,B,C = map(int,input().split())
answer=B+C-A

if answer>=0:
  print(answer)
else :
  print(0)