peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
from fractions import gcd


n = int(input())
a = int(input())
for i in range(n-1):
    b = int(input())
    a = a * b// gcd(a, b)
print(a)
# Judge status: Accepted
a, b, x = map(int, input().split())

p = 0
y = int(b//x) + 1

i = 1
#for i in range(1,y):
while x*i <= b:
    if a <= x*i:
        p = x*i
        break
    i += 1

if p != 0:
    t = b-p
    s = t//x
    ans = s + 1
    if a == 0:
        ans += 1
    print(ans)
elif a == 0:
    print(1)
else:
    print(0)
# Judge status: Wrong Answer
X,Y,Z = map(int,input().split())
print((X-Z/(Y+Z)))
# Judge status: Accepted
a, b = map(int, input().split())

print(max(2*a-1, a+b, 2*b-1))
# Judge status: Wrong Answer
N,M,X =map(int,input().split())
A = [list(map(int,input().split())) for _ in range(N)]

ans = -1

import itertools

for v in itertools.product([0,1], repeat=N):
    ls = [0]*(M+1)
    for i in range(N):
        if v[i] == 1:
            ls = [x + y for (x, y) in zip(ls, A[i])]

    flag = 1 
    for i in range(1,M+1):
        if ls[i] < 10:
            flag = 0
    
    if flag == 1 and (ans == -1 or ans > ls[0]):
        ans = ls[0]     

print(ans)
# Judge status: Wrong Answer
A, B, K = [int(x) for x in input().split(" ")]

if A >= K:
  print("{} {}".format(A-K, B))
elif A < K and A+B >= K:
  print("{} {}".format(0, int(A-K/2+B-K/2)))
else:
  print(0)
# Judge status: Wrong Answer
Q,H,S,D = [int(i) for i in input().split()]
costs = [[Q,0.25], [H,0.5], [S,1], [D,2]]
costs.sort(key=lambda x: x[0] / x[1])
N = int(input())
tc = 0
for c, a in costs:
    tc += c * (N // a)
    N %= a
print(int(tc))
# Judge status: Wrong Answer
import sys
import re

l = sys.stdin.readline()
l = l.split(' ')
l = [int(str) for str in l]

n = l[0]
a = l[1]
b = l[2]

if(abs(a-b)%2==0):
	print(int(abs(a -b)/2))
else:
	smax = max( a - 1, b - 1)
	emax = max( n - a, n - b)
	tmin = min( smax, emax)
	print(int(tmin))

sys.stdout.flush()
# Judge status: Wrong Answer
import bisect
n = int(input())
ans = [-1*int(input())]
for i in range(n-1):
  a=int(input())
  a=-1*a
  if ans[-1]<=a:
    ans.append(a)
  else:
    b = bisect.bisect_left(ans,a)
    ans[b]=a
print(len(ans))
# Judge status: Wrong Answer
#abc108 a
k=int(input())
ans=0
for i in range(2,k+1):
    for j in range(2,k+1):
        if i%2==0 and j%2==1:
            ans+=1
print(ans)
# Judge status: Accepted
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

S = set(list(input()))

print("Yes" if len(S) == 2 else "No")
# Judge status: Wrong Answer
N = int(input())
A = int(input())
if N//500<A:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
n,k=map(int,input().split())
c=1000000
for i in range(n):
    x,y=map(int,input().split())
    if(y<=k):
        c=min(c,x)
if(c==1000000):
    print("TLE")
else:
    print(c)
# Judge status: Accepted
def solve():
  cnt = 0
  N = int(input())
  ans = []
  for i in range(1,N+2):
    cnt += i
    ans.append(i)
    if cnt>N:
      ans.remove(cnt-N)
    if cnt>=N:
      break
  return ans
print(*solve(),sep='\n')
# Judge status: Wrong Answer
import bisect

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

l.sort()
a = sorted(list(set(l)))
ans = 0

for b in range(1,n - 1):
    for c in range(b + 1,n):
        left = bisect.bisect_left(a,l[c] - l[b] + 1)
        right = bisect.bisect_right(a,l[b])
        ans+=max(0,right - left - 1)

print(ans)
# Judge status: Accepted
H = int(input())

pw = 1
cnt = 0
while True:
    pw *= 2
    if pw > H:
        break
    cnt += 1

print(pw - 1)
# Judge status: Accepted
n = int(input())
a = int(input())
if n%500<=a:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
a , b = map(int,input().split())
x = (a+b) / 2
print(int(x) if x.is_integer() else 'IMPOSSIBLE' )
# Judge status: Accepted
h,w=map(int,input().split())
result = h*w
if h==1 or w==1:
    print(1)
elif result%2==0:
    print(int(result//2))
else:
    print(int(result//2)+1)
# Judge status: Accepted
A,B,C,X,Y = map(int,input().split())
min_xy = min(X,Y)
max_xy = max(X,Y)
ans1 = 2 * C * min_xy + A * (X-min_xy) + B * (Y-min_xy) # 無駄にならない範囲でABピザを買い、残りを買う
ans2 = A*X + B*Y # ABピザを買わない
ans3 = 2 * C * max_xy # ABピザだけを買う
print (min(ans1,ans2,ans3))
# Judge status: Wrong Answer
A, B = map(int, input().split())

def main1(A, B):
    res = 0
    if B + 1 < A:
        res = (A * 2) - 1
    elif A == B :
        res = A + B
    else:
        res = (B * 2) - 1
    print(res)

main1(A, B)
# Judge status: Wrong Answer
# A - Red or Not

# 整数 a と、文字列 s を入力
# a >= 3200 なら s を、3200未満なら 'red' を出力
# 2800 <= a < 5000

a = int(input())
s = str(input())

if a > 2800 and a < 3200:
    print('red')

elif a >= 3200 and a < 5000:
    print(s)
# Judge status: Wrong Answer
n = int(input())
s = input()

print(s[n:] + s[:n])
# Judge status: Wrong Answer
m = 10 ** 9 + 7
def cmb(x,y):
    r=1
    for i in range(1,y+1):
        r=(r*(x-i+1)*pow(i,m-2,m))%m
    return r

x, y = map(int, input().split())
if (2 * x - y) % 3 == 0 and (2 * y - x) % 3 == 0:
    print(cmb(int((x + y) / 3), int((2 * y - x) / 3)))
# Judge status: Wrong Answer
N = int(input())
a = list(map(int, input().split()))
match = 0

index = 0
i = 1
while True:
    for j in range(N-1, index-1, -1):
        if a[j] == i:
            index = j + 1
            i += 1
            match += 1
            break
    else:
        break

print(N - match if match else -1)
# Judge status: Wrong Answer
a, b = input().split()
a = int(a)
b = int(b)

x = 1
num = 0
while True:
    x += a - 1
    num += 1
    if x >= b:
        break
        
print(num)
# Judge status: Wrong Answer
a = list(map(int, input().split()))
print("Draw" if a[0] == a[1] else ("Alice" if a[0] > a[1] and a[1] != 1 else "Bob"))
# Judge status: Wrong Answer
s = input()

ans = 0
pre = ""
now = ""

for c in s:
    now += c

    if pre == now:
        pre += now
    else:
        ans += 1
        pre = now
        now = ""
print(ans)
# Judge status: Wrong Answer
n=int(input())
s="E"+input()+"W"
w=[int(i=="W") for i in s]
e=[int(i=="E") for i in s]
for i in range(1,n+2):
  w[i]+=w[i-1]
  e[i]+=e[i-1]
# print(w,e)
# e.append(e[-1])
ans=[]
for j in range(1,n+1):
  ans+=(w[j-1]-w[0]+e[-1]-e[j+1]),
print(min(ans))
# Judge status: Wrong Answer
import numpy as np
N, M = map(int, input().split(' '))

Ns = [list(map(int, input().split())) for i in range(N)]
Ms = [list(map(int, input().split())) for i in range(M)]
print(Ms)
for a, b in Ns:
	dists = []
	for c, d in Ms:
		dists.append(abs(a - c) + abs(b - d))
	print(np.argmin(dists) + 1)
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))

if len(a) == len(set(a)):
    print("YES")
else:
    print("NO")
# Judge status: Accepted
n,a=int(input()),sorted(list(map(int,input().split())))
m=a[-1]+1
s=[0]*m
for i in a:s[i]+=1
for i in set(a):
	if s[i]:
		for j in range(i*2,m,i):s[j]=0
print(s.count(1))
# Judge status: Wrong Answer
s = input()
l = ['Sunny', 'Cloudy', 'Rainy', 'Sunny']
for i in l:
    if s == i:
        print(l[l.index(s) + 1])
# Judge status: Wrong Answer
from fractions import gcd
a,b = map(int,input().split())
print(a * b / (gcd(a,b)))
# Judge status: Accepted
from collections import defaultdict

N = int(input())
X = [int(i) for i in input().split()]
D = defaultdict(int)
for x in X:
    D[x] += 1

B = []
for x in D:
    for _ in range(D[x] // 2):
        B.append(x)
B.sort()
ans = B[-1] * B[-2] if len(B) >= 2 else 0
print(ans)
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))
j = 1
ans = 0
for i in a:
    if i == j:
        j += 1
    else:
        ans += 1
if j == 1:
    print(-1)
else:
    print(ans)
# Judge status: Accepted
def main():

    N = int(input())
    ans = [0] * (N + 1)

    for x in range(1, int(N ** 0.5) + 2):
        for y in range(1, int(N ** 0.5) + 2):
            for z in range(1, int(N ** 0.5) + 2):
                n = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
                if n > N:
                    continue

                ans[n] += 1
    print(*ans[1:], sep="\n")


if __name__ == '__main__':
    main()
# Judge status: Accepted
s = input()
l = [int(x) for x in s]
print(l.count(1))
# Judge status: Accepted
n, x, y = [int(i) for i in input().split()]
ans = [0]*n
for i in range(n-1):
    for j in range(i+1, n):
        ans[min(j-i, abs(x-(i+1))+abs((j+1)-y)+1)] += 1

print(*ans[1:], sep='\n')
# Judge status: Wrong Answer
a, b = map(int, input().split())
if a >= b:
    ans = 1
else:
    ans = (b-2)//(a-1)+1
print(ans)
# Judge status: Wrong Answer
import sys
sys.setrecursionlimit(4100000)

k,n = map(int,input().split())
a = list(map(int,input().split()))
b = []
for v in range(n-1):
    b.append(a[v+1]-a[v])

b.append(k-a[n-1]+a[0])
print(b)
anss = max(b)
ans = k - anss
print(str(ans))
# Judge status: Accepted
n = int(input())
for i in range(10):
	for j in range(10):
		if i * j == n:
			print('Yes')
			exit()
print('No')
# Judge status: Wrong Answer
num=list(map(int,input().split()))
k=int(input())
ans1=sum(num)-max(num)
ans2=0

for i in range(k):
  ans2+=max(num)*2

  
print(ans1+ans2)
# Judge status: Accepted
def main():
    # start coding here...
    N = int(input())
    a = []
    b = []
    for i in range(N):
        x,y = map(int,input().split())
        a.append(x+y)
        b.append(x-y)
    ans = max(max(a)-min(a),max(b)-min(b))
    print(ans)


if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
a,b,c,d,e,k=[int(input()) for i in range(6)]
print(e-a if e-a<=k else ":(")
# Judge status: Wrong Answer
def main():
    N = input()
    L = map(int, input().split())
    a = max(L)
    b = sum(L) - a
    if a < b:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()
# Judge status: Accepted
from collections import Counter # 重複個数のカウント: Counter(num_list)

def main():
    n, k = map(int, input().split())
    num_list = list(map(int, input().split()))

    count_list = Counter(num_list)

    tmp_list = []

    for v in count_list.values():
        tmp_list.append(v)

    tmp_list.sort()
    
    count = 0
    for i in range(len(tmp_list)-k):
        count += tmp_list[i]

    print(count)

if __name__ == '__main__':
    main()
# Judge status: Accepted
a, b, c = map(int, input().split())

if a == b+c or b == a+c or c == a+b:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
N, M = map(int, input().split())
d = M - N * 2
print(N + d // 4 if d > 0 else M // 2)
# Judge status: Wrong Answer
a, b, c, k = map(int, input().split())
ans = b-c
if k%2:
  ans *= -1
if abs(ans) >= pow(10,18):
  print("Unfair")
else:
  print(ans)
# Judge status: Wrong Answer
N = int(input())
A = [int(input()) for _ in range(N)]
ans = 0
for i in range(N):
    ans += A[i] // 2
    A[i] %= 2

for i in range(N-1):
    if A[i] == A[i + 1] == 1:
        ans += 1
        A[i] = 0
        A[i + 1] = 0
print(ans)
# Judge status: Wrong Answer
str = input()
count = -1
answer = 0
for id in range(len(str)):
    if str[id] == "A": count = 0
    if count == -1: continue
    count += 1
    if str[id] == "Z": 
        answer = max(answer, count)
        count = -1
print(answer)
# Judge status: Wrong Answer
S = input()
l = ['maerd','remaerd', 'esare', 'resare']

def test(S,l):
    tmpS = S
    while len(tmpS) > 0:
        if tmpS[::-1] in l:
            print('YES')
            return
        if tmpS[-1:-6:-1] in l:
            tmpS = tmpS[:-5]
        elif tmpS[-1:-7:-1] in l:
            tmpS = tmpS[:-6]
        else:
      	    print('NO')
      	    return
    print('YES')
    return
  
test(S,l)
# Judge status: Wrong Answer
import sys

input = sys.stdin.readline


def main():

    # print(ord("A"))
    # print(ord("Z"))

    SS =[]
    N =int(input())
    S =input()
    for i in range(len(S)):
        temp = ord(S[i]) + N
        temp = (temp-65) % 26 + 65
        SS.append( chr(temp))



    for i in SS:
        print(i,end="")
	
    print("")







if __name__ == "__main__":
    main()
# Judge status: Accepted
s = input()
l = len(s)
S = list(s)
ans = 0

for i in range(l//2):
    if S[i] != S[l-i-1]:
        S[i-1] = S[l-i-1]
        ans += 1

print(ans)
# Judge status: Accepted
x,y = map(int,input().split())
if x%y==0:print(-1)
else:print(x)
# Judge status: Accepted
w=input()
check=False
for i in w:
  if(not w.count(i)%2==0):
    check=True
    break
if (check):
  print("No")
else:
  print("Yes")
# Judge status: Wrong Answer
def main():
    import sys

    def input(): return sys.stdin.readline().rstrip()

    n = int(input())
    a = list(map(int, input().split()))
    b = list(map(int, input().split()))
    s = 0
    sm = 0
    for x, y in zip(a,b):
        tmp = y-x
        sm += tmp
        if tmp > 0:
            tmp //= 2
        s += tmp
    if s >= sm and sm >= 0:
        print('Yes')
    else:
        print('No')

    
if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
s = input()
l = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
for i in range(7):
    if s == 'SUN':
        print(7)
    else:
        if s == l[i]:
            print(7-i)
# Judge status: Accepted
import sys
input = lambda: sys.stdin.readline().rstrip()


a,b,c = map(int, input().split())
if c - a - b < 0:
    print("No")
elif (c - a - b)**2 > 4*a*b:
    print("Yes")   
else:
    print("No")
# Judge status: Accepted
a, b, c, d = map(int, input().split())
if abs(a-c) <= d:
    print('Yes')
    exit()
l = [a, b, c]
l.sort()
if l[2] - l[1] <= d and l[1] - l[0] <= d:
    print("Yes")
else:
    print('No')
# Judge status: Accepted
a, b = sorted(map(int, input().split()))
print(str(a) * b)
# Judge status: Wrong Answer
N = int(input())
A = list(map(int,input().split()))
ans = [0]*N

ans[0]= 0
for i in range(N-1):
    ans[0] = ans[0]^A[i+1]

All = ans[0]^A[0]

for i in range(N):
    ans[i] = All^A[i]

print(ans)
# Judge status: Accepted
N, M = map(int, input().split())
limL = -454554565454
limR = 7896541265478456
for i in range(M):
  L, R = map(int, input().split())
  limL = max([limL, L])#lとしては，大きい方が嬉しい
  limR = min([limR, R])#rは小さい方がいい

print(limR-limL+1) if limR-limL+1>0 else print(0)
# Judge status: Accepted
from collections import defaultdict
import sys
N = int(input())
W = [input() for _ in range(N)]

dict = defaultdict(bool)  # int/bool/list....
dict[W[0]] = True
for i in range(1, N):
    if (W[i][0] is not W[i - 1][-1]) or dict[W[i]]:
        print("No")
        sys.exit()
    dict[W[i]] = True

print("Yes")
# Judge status: Accepted
N = int(input())
W = [str(input()) for i in range(N)]

if len(W) != len(set(W)):
    print("No")
    exit()

else:
    for i in range(N-1):
        if W[i][-1] != W[i+1][0]:
            print("No")
            exit()

    print("Yes")
# Judge status: Wrong Answer
r, g, b = [int(x) for x in input().split()]
m = int(input())
if g < r:
    while g < r:
        g *= 2
        m += 1
if b < g:
    while b < g:
        b *= 2
        m += 1
print("Yes" if r < g < b else "No")
# Judge status: Accepted

MOD = 10 ** 9 + 7
MAX = 60

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

cnt = [0 for i in range(MAX)]
for i in range(n):
    bit = bin(a[i])[2:].zfill(MAX)
    for j in range(MAX):
        cnt[j] += int(bit[j])

ans = 0
for i in range(MAX):
    ans += cnt[MAX - i - 1] * (n - cnt[MAX - i - 1]) * 2 ** i
    ans %= MOD
print(ans)
# Judge status: Accepted
N=int(input())
j=0

for i in range(7):
    if 2**i <=N:
        j=2**i

print(j)
# Judge status: Accepted
K = int(input())

mods = [0] * (K+1)
mods[1] = 7 % K

for i in range(2,K+1):
    mods[i] = (mods[i-1] * 10 + 7) % K

for i in range(1,K+1):
    if mods[i] == 0:
        print(i)
        exit(0)    
print(-1)
# Judge status: Accepted
n,y = map(int,input().split())
ans = [0]*3
for i in range(n+1):
    for j in range(n+1):
        if i*10000 + j*5000 + (n-i-j)*1000 == y and (n-i-j) >= 0:
            print(i,j,n-i-j)
            exit()
else:
    print(-1,-1,-1)
# Judge status: Accepted
n = int(input())

if n%9 == 0:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
import sys
import heapq
sys.setrecursionlimit(10**6)
input = lambda: sys.stdin.readline().rstrip()

A = sum(map(int,input().split()))
if A < 22:
    print("win")
else:
    print("bust")
# Judge status: Accepted
A,B,C,X,Y=map(int,input().split())
M=[A,B,C]

ans=[]

ans.append(A*X+B*Y)
ans.append(C*max(X,Y)*2)

if X>Y:
  ans.append(C*min(X,Y)*2+A*(X-min(X,Y)))
if Y>X:  
  ans.append(C*min(X,Y)*2+B*(Y-min(X,Y)))

print(min(ans))
# Judge status: Accepted
import sys
def input(): return sys.stdin.readline().strip()

def main():
    r, g, b = map(int, input().split())
    n = 10 * g + b
    if n % 4 == 0:
        print("YES")
    else:
        print("NO")

if __name__ == "__main__":
    main()
# Judge status: Accepted
a,b,n=map(int,input().split())

max = 0
if b - 1 > n:
    x = n
else:
    x = b - 1

max = (a * x // b) - a * (x // b)

print(max)
# Judge status: Accepted
N = [int(e) for e in input().split()]
if(N[3] - N[0] > 0):
    N[3] -= N[0]
    if(N[3] - N[1] > 0):
        N[3] -= N[1]
        ans = N[0] - N[3]
    else:
        ans = N[0]
else:
    ans = N[3]
print(ans)
# Judge status: Accepted
n=int(input())
ans=0
cnt=0
for i in range(n):
    a=int(input())
    if a==0:
        ans+=cnt//2
        cnt=0
    else:
        cnt+=a
ans+=cnt//2
print(ans)
# Judge status: Wrong Answer
import sys
import math

a, b, c = map(int, input().split())
ma = max(a, max(b, c))
mi1 = min(a,min(b,c))
mi2 = a + b + c - ma - mi1
ans=0
if ((ma - mi2) % 2 == 0 and (ma - mi1) % 2 == 0):
    ans = (ma - mi2) // 2 + (ma - mi1) // 2
elif((mi2-mi1)%2==1):
    tmp=mi2-mi1
    ans = tmp + (ma + tmp) - mi2
elif((mi2-mi1)%2==0):
    tmp = mi2 - mi1
    ans = tmp // 2 + ma - mi2
elif ((ma - mi2) % 2 != 0 and (ma - mi1) % 2 != 0):
    ans=ma-mi1+(mi2-mi1)
print(ans)
# Judge status: Accepted
N,A,B = list(map(int,input().split()))
if (B-A)%2 == 0:
    print((B-A)//2)
    exit()
A1 = A
B1 = B
A2 = A
B2 = B
count1 = N-B1
ans1 = 0
A1 += (N-B1)
B1 = N
if (B1-A1)%2 == 0:
    ans1 = count1+(B1-A1)//2
else:
    ans1 = count1+1+(B1-A1)//2

count2 = A2-1
ans2 = 0
B2 -= (A2-1)
A2 = 1
if (B2-A2)%2 == 0:
    ans2 = count2+(B2-A2)//2
else:
    ans2 = count2+1+(B2-A2)//2
print(min(ans1,ans2))
# Judge status: Accepted
A,B,C=map(int,input().split())
ans=10**19
whole=A*B*C
for a in range(A//2,A//2+2):
  ans=min(ans,abs(whole-a*B*C*2))
for b in range(B//2,B//2+2):
  ans=min(ans,abs(whole-A*b*C*2))
for c in range(C//2,C//2+2):
  ans=min(ans,abs(whole-A*B*c*2))
print(ans)
# Judge status: Wrong Answer
X, Y, A, B, C = map(int, input().split())
apples = [(0, int(x)) for x in input().split()]
apples.extend((1, int(x)) for x in input().split())
apples.extend((2, int(x)) for x in input().split())
apples.sort(key=lambda t: t[1], reverse=True)
print(sum(t[1] for t in apples[:X + Y]))
# Judge status: Wrong Answer
n, m = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(n)]
cd = [list(map(int, input().split())) for _ in range(m)]
ans = [1e8] * n
for i in range(n):
    seq_min = 1e8
    for j in range(m):
        seq = abs(ab[i][0] - cd[j][0]) + abs(ab[i][1] - cd[j][1])
        if seq_min > seq:
            seq_min = seq
            ans[i] = j + 1
for a in ans:
    print(a)
# Judge status: Accepted
d, t, s = map(int, input().split())

if((d / s) <= t):
    print("Yes")
else:
    print("No")
# Judge status: Accepted
n,m=map(int,input().split())
if n<10 and m<10:
    print(n*m)
else:
    print(-1)
# Judge status: Accepted
n,h = map(int,input().split())
a = [0] * n
b = [0] * n
for i in range(n):
    a[i],b[i] = map(int,input().split())

ama = max(a)
b.sort(reverse=True)
c = 0
i = 0
while(h > 0):
    if(i >= n):break
    if(b[i] > ama):
        c += 1
        h -= b[i]
        i += 1
    else:
        break
h = max(0,h)
c += h // ama
if(h % ama != 0):c += 1
print(c)
# Judge status: Accepted
a,b,c=map(int,input().split())
if c < a or b < c:
  print('No')
else:
  print('Yes')
# Judge status: Accepted
n=int(input())
c=input()
R=c.count("R")
W=c.count("W")
LW=0
for i in range(R):
    if c[i]=="W":
        LW+=1
print(LW)
# Judge status: Accepted
K, N = map(int, input().split())
D = list(map(int, input().split()))
D.sort()
flag = False
while True:
  K_str = str(K)
  for i in range(len(K_str)):
    for j in range(len(D)):
      if K_str[len(K_str)-1-i]==str(D[j]):
        flag=False
        break
      if j==len(D)-1:
        flag = True

    if not flag:
      break

  if flag:
    break
  K+=1

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

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

ans = b[0] + max(b[n-2],b[n-3])
for i in range(1,n-1):
     ans += min(b[i-1],b[i])



print(ans)
# Judge status: Accepted
N, K = map(int, input().split(" "))
arr = list(map(int, input().split(" ")))
arr.sort()
print(sum(arr[:K]))
# Judge status: Accepted
x,y = map(int,input().split())
tmp = x
cnt = 0

while tmp <= y:
  tmp *= 2
  cnt += 1

print(cnt)
# Judge status: Wrong Answer
n = int(input())
a, b = [], []
for i in range(n):
    x, y = map(int, input().split())
    a.append(x)
    b.append(y)
a.sort()
b.sort()
if n%2==0:
    p = n//2
    right = (a[p]+a[p-1])/2 -1
    left = (b[p]+b[p-1])/2
else:
    p = n//2
    right = a[p]
    left = b[p]
print(int(left-right)+1)
# Judge status: Accepted
A, B = list(map(int, input().split()))
ans = -1
for i in range(1, 1009):
    if int(i*0.08) == A and int(i*0.10) == B:
        ans = i
        break
print(ans)
# Judge status: Accepted
N=int(input())

a=N//5
b=N//3
c=N//15

sum=N*(N+1)/2-5*a*(a+1)/2-3*b*(b+1)/2+15*c*(c+1)/2

print(int(sum))
# Judge status: Wrong Answer
import random

S = random.randint(1, 100)
W = random.randint(1, 100)

if S>W:
  print('safe')
else:
  print('unsafe')
# Judge status: Accepted
import sys
input = sys.stdin.readline
from collections import *

N = int(input())
A = list(map(int, input().split()))
A.sort(reverse=True)
l = [A[0]]

for Ai in A[1:]:
    l.append(Ai)
    l.append(Ai)
    
print(sum(l[:N-1]))
# Judge status: Wrong Answer
s = list(input())
k = int(input())

for i in range(len(s)):
    a = 26-(ord(s[i])-97)
    # print(ord(s[i]))
    # print(a)
    if k >= a:
        k -= a
        s[i] = "a"
# print(k)
s[-1] = chr(97+((ord(s[-1])+k) % 97) % 26)
# print(ord(s[-1]))
print("".join(s))
# Judge status: Wrong Answer
N=int(input())
A=list(map(int,input().split()))

X=[0]*8
Y=0

for a in A:
    if a>=3200:
        Y+=1
    else:
        X[a//400]+=1
        
if Y==N:
    print(0,min(8,N))
else:
    a=8-X.count(0)
    b=min(8,a+Y)
    print(a,b)
# Judge status: Wrong Answer
x = list(map(int, input("").split()))

for i in range(1,5):
    if x[i-1] != i:
        print(i)
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
print("Yes"if a<=c<=b else "No")
# Judge status: Accepted
n,a,b = map(int,input().split())
cnt = 0
for i in range(1,n+1):
    x = sum([int(j) for j in list(str(i))])
    if a <= x <= b:
        cnt += i
print(cnt)
# Judge status: Wrong Answer
X = int(input())

if X <= 400 and X <= 599:
    print(8)
elif 600 <= X and X <= 799:
    print(7)
elif 800 <= X and X <= 999:
    print(6)
elif 1000 <= X and X <= 1199:
    print(5)
elif 1200 <= X and X <= 1399:
    print(4)
elif 1400 <= X and X <= 1599:
    print(3)
elif 1600 <= X and X <= 1799:
    print(2)
elif 1800 <= X and X <= 1999:
    print(1)
# Judge status: Accepted
r, g, b = input().split()
sp = r + g + b
if int(sp) % 4 == 0:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
a = sorted(list(map(int, input().split())))
print("YES" if a == [5,5,7] else "NO")
# Judge status: Wrong Answer
O = input()
E = input()
ans = ""
for i in range(len(E)):
    ans += O[i] + E[i]
if len(E) > len(O):
    ans += O[len(O)-1]
print(ans)
# Judge status: Wrong Answer
a,b,k = list(map(int,input().split(" ")))

if a > k:
    a -= k
    print(str(a) + " " + str(b))
else:
    left = k - a
    b -= left
    print(str(0) + " " + str(b))