peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
from math import ceil

N, H = map(int, input().split())

A = []
B = []
for _ in range(N):
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)
else:
    a = max(A)
    B.sort()
    B.reverse()

ans = 0
for b in B:
    if H <= 0:
        print(ans)
        break

    if a < b:
        H -= b
        ans += 1
else:
    print(ans + ceil(H / a))
# Judge status: Accepted
N = int(input())
print(-(-N//2)/N)
# Judge status: Accepted
import math
from functools import reduce

def gcd(list):
  return reduce(math.gcd, list)

n, x = map(int, input().split())
a = map(lambda b: abs(int(b) - x), input().split())
print(gcd(a))
# Judge status: Accepted
t = 0
N = int(input())
a = list(map(int,input().split()))

while True:
    if [i for i in a if i %2 == 1]:
        break
    a = [i/2 for i in a]
    t += 1
print(t)
# Judge status: Wrong Answer
S = input()
T = input()

cnt = 0
for i in range(len(S)):
    tmp = 0
    for j in range(len(T)):
        if i + j < len(S) and S[i + j] == T[j]:
            tmp += 1
        else:
            cnt = max(cnt, tmp)
            tmp = 0
    cnt = max(cnt, tmp)

print(len(T) - cnt)
# Judge status: Wrong Answer
N = int(input())
ans = 0
for n in range(1,N+1):
    if n%10==0:continue
    s = str(n)
    if s[0]==s[-1]:
        if int(s[0])<=N:ans+=1
    for i in range(10):
        a = int(s[-1]+"9"*i+s[0])
        b = int(s[-1]+"0"*i+s[0])
        if a<=N:ans+=pow(10,i)
        else:
            if b<=N:ans+=(N-a)//10+1
            break
print(ans)
# Judge status: Wrong Answer
s=input()
t=input()
ans=0
for i in range(len(s)):
    if s[i]==t[i]:
        ans += 1
print(ans)
# Judge status: Wrong Answer
n,x,y=map(int,input().split())
s= input()
c=0
d=x+y
f= False
for i in range(n):
    if s[i]=="a":
        if c<=d:
            f=True
    elif s[i]=="b":
        if c<=d and c<=y:
            f=True
    if f:
        print("Yes")
        c+=1
    else:
        print("No")
    f=False
# Judge status: Accepted
a,b=map(int, input().split())
c=sorted(list(map(int, input().split())),reverse = True)

ans = 0

if b >= a:
    c = [0]
if b < a:
    for i in range(b):
        c[i] = 0

print(sum(c))
# Judge status: Accepted
# 099a
# A - ABD

N = int(input())

if 1 <= N & N <= 999:
    print('ABC')
elif 1000 <= N & N <= 1998:
    print('ABD')
# Judge status: Accepted
import collections,sys
def I(): return int(sys.stdin.readline().rstrip())
N = I()
A = [I() for _ in range(N)]
count_A = collections.Counter(A)
print(sum([1 for v in count_A.values() if v%2==1]))
# Judge status: Accepted
n,k=map(int, input().split())
l1=[]
for i in range(k):
    x=int(input())
    l=list(map(int, input().split()))
    for i in l:
        l1.append(i)
s=set(l1)
print(n-len(s))
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))

MOD = 10 ** 9 + 7

def gcd(x, y):
  return x if y == 0 else gcd(y, x % y)

def lcm(x, y):
  return x * y // gcd(x, y)

tmp = A[0]
for i in range(1, N):
  tmp = lcm(A[i], tmp)
#print(tmp)

answer = 0
for a in A:
  answer += tmp // a
print(answer % MOD)
# Judge status: Accepted
import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    n = int(input())
    a = list(map(int, input().split()))
    cnt = [0] * (max(a)+3)
    
    for i in a:
        cnt[i-1] += 1
        cnt[i] += 1
        cnt[i+1] += 1
        
    print(max(cnt))
    
if __name__ == '__main__':
    main()
# Judge status: Accepted
n,k=map(int,input().split())
a=[int(i) for i in input().split()]
x=n-1
y=k-1
print((x+y-1)//y)
# Judge status: Accepted
#ABC049.A
s = input()
if s == 'a' or s == 'i' or s == 'u' or s == 'e' or  s== 'o':
    print('vowel')
else:
    print('consonant')
# Judge status: Wrong Answer
import sys
input = sys.stdin.readline

def main():
    N, Q = map(int, input().split())
    S = input().rstrip()
    ac_flag = []
    for i in range(N-1):
        if S[i:i+2] == 'AC':
            ac_flag.append(1)
        else:
            ac_flag.append(0)
    for _ in range(Q):
        l, r = map(int, input().split())
        print(0)


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
# coding: utf-8
# Your code here!
n,k=map(int,input().split())

A=list(map(int,input().split()))
L=[1]
now=1
for _ in range(n):
        now=A[now-1]
        if now == L[0]:
                break
        L.append(now)
        
R=k%len(L)
print(L[R])
# Judge status: Wrong Answer
n = list(input())
a = int(''.join(n))
b = []
b.append(int(n[0]) * 111)
b.append(int(n[1]) * 111)
b.append(int(n[2]) * 111)
b = sorted(b)
if a % 111 == 0:
    print(a)
else:
    for i in range(3):
        if b[i] > a:
            print(b[i])
            exit()
# Judge status: Wrong Answer
import math

x = int(input())
for i in range(1, 121):
    b = x - i**5
    b = b**.2
    if math.ceil(b) - math.floor(b) < 1e6:
        print(i, int(b))
        exit(0)
# Judge status: Wrong Answer
n,k = map(int,input().split())
A=[*map(int,input().split())]
m = min({19,k,n})
for i in range(m):
    B = [0]*n
    for j in range(n):
        d = A[j] # 強さ
        l = max(0, j-d) # 範囲
        r = j+d+1 # 範囲
        B[l] += 1
        if r <= n-1: B[r] -= 1
    for j in range(n-1):
        B[j+1] = B[j+1] + B[j]
    A = B
print(*B,sep=' ')
# Judge status: Accepted
a,b=map(int, input().split())

def primes(m):
    pf={}
    for i in range(2,int(m**0.5)+1):
        while m%i==0:
            pf[i]=pf.get(i,0)+1
            m//=i
    if m>1:pf[m]=1
    return pf

A=list(primes(a).keys())
B=list(primes(b).keys())
ans=1
for i in A:
    if i in B:
        ans+=1
print(ans)
# Judge status: Accepted
a,b,c = map(int,input().split())
if a == b != c :
    print("Yes")
elif b == c != a :
    print("Yes")
elif a == c != b :
    print("Yes")
else :
    print("No")
# Judge status: Wrong Answer
s = input()
if int(s[6]) > 4:
  print("TBD")
else:
  print("Heisei")
# Judge status: Wrong Answer
a, b = map(int, input().split())
c = 0
for i in range(a, b+1):
  s = str(i)
  if s[:len(s)//2] == s[len(s)//2+1:]:
    c += 1
print(c)
# Judge status: Wrong Answer
N, K=map(int,input().split())
A=list(map(int,input().split()))

def judge(ans,K,A):
    cut=0
    for i in range(len(A)):
        cut+=int(A[i]/ans)
    if cut>K:
        return False
    else:
        return True

ansp=10**9
ansm=1

while ansp-ansm>0.00001:
    ans=((ansp+ansm)/2)
    if judge(ans,K,A):
        ansp=((ansp+ans)/2)
        
    else:
        ansm=((ans+ansm)/2)
        
print(int(ans)+1)
# Judge status: Accepted
n = int(input())
mod = 10**9+7

print((10**n-(9**n+9**n-8**n))%mod)
# Judge status: Wrong Answer
n = int(input())
s = input()

key = [False]*n

ans1 = 0
for i in range(1, n):
  if (s[i-1] == "#" or key[i-1]) and s[i] == "." :
    ans1 += 1
    key[i] = True

ans2 = 0
for i in range(n-1, 0, -1):
  if (s[i] == "." or key[i]) and s[i-1] == "#":
    ans2 += 1
    key[i-1] = True

print(min([ans1, ans2]))
# Judge status: Accepted
a,b,c=map(int,input().split())
if b/a>=c:
    print(c)
else:
    print(int(b/a))
# Judge status: Accepted
N = int(input())
ABs = []
for i in range(N):
  X, L = map(int, input().split())
  A, B = X-L, X+L
  ABs.append((A, B))
ABs.sort(key=lambda AB: AB[1])
#print(ABs)
r = 1
b = ABs[0][1]
for i in range(1, N):
  A, B = ABs[i]
  if A >= b:
    r += 1
    b = B
print(r)
# Judge status: Accepted
d, t, s = map(int, input().split())

if d / s > t:
  print('No')
else:
  print('Yes')
# Judge status: Accepted
y = int(input())
p = (pow(y , 0.5))
print(pow(int(p) , 2))
# Judge status: Wrong Answer
a, b = map(int, input().split())

if (a+b)%2 == 0 :
    print((a+b)/2)
else :
    print("IMPOSSIBLE")
# Judge status: Wrong Answer
N, M = map(int, input().split())
MOD = 10**9+7

def factorial(n):
    ans=1
    for i in range(1, n+1):
        ans = (ans * i) % MOD
    return ans

if N == M:
    print((2* factorial(N) ** 2) % MOD)
elif N == M + 1:
    print(factorial(M)**2*N)
elif M == N + 1:
    print(factorial(N)**2*M)
else:
    print(0)
# Judge status: Accepted
import math

X = int(input())
prime = False
primecheck = True

if X <= 2:
    prime_num = X

else:
    while prime == False:

        for i in range(2, int(math.sqrt(X))):
            if X % i == 0:
                X += 1
                primecheck = False
                break

        if primecheck == False:
            primecheck = True
        else:
            prime = True
            prime_num = X

print(prime_num)
# Judge status: Accepted
N=int(input())
A=[]
B=[]
for i in range(N):
    a,b=map(int,input().split())
    A.append(a)
    B.append(b)
A.sort()
B.sort()
if N%2==1:
    print(B[N//2]-A[N//2]+1)
else:
    A_chu=(A[N//2-1]+A[N//2])/2
    B_chu=(B[N//2-1]+B[N//2])/2
    ans=(B_chu-A_chu)*2+1
    print(int(ans))
# Judge status: Accepted
w, h, x, y = map(int, input().split())

s = w*h/2

if w/2 == x and h/2 == y:
    t = 1
else:
    t = 0

print(s, t)
# Judge status: Accepted
def main():
    s = input()
    ans = 0
    pre = ""
    is_same = False

    for i in range(len(s)):
        if is_same:
            pre += s[i]
            ans += 1
            is_same = False
            continue

        if pre != s[i]:
            ans += 1
            pre = s[i]
        else:
            is_same = True

    print(ans)


if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
K = int(input())
count =0 
j =0 
while True:
    j+=1
    t = [int(i) for i in list(str(j))]
    a = len(t)
    for i,v in enumerate(t):
        if i < a-1:
            if abs(t[i] - t[i+1]) > 1:
                break
    count += 1
    if count ==K:
        print(j)
        exit()
# Judge status: Wrong Answer
q, r = divmod(sum(map(int, input().split())), 2)
print(q if r else 'IMPOSSIBLE')
# Judge status: Accepted
# https://atcoder.jp/contests/agc002/tasks/agc002_b

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

xy = []
for _ in range(m):
    x, y = map(int, input().split())
    xy.append((x - 1, y - 1))

box = [0] * n
box[0] = 1
num = [1] * n
for x, y in xy:
    if box[x]:
        box[y] |= 1
    num[x] -= 1
    num[y] += 1
    if not num[x]:
        box[x] = 0
ans = 0
for i in range(n):
    if box[i] and num[i]:
        ans += 1
print(ans)
# Judge status: Accepted
n = int(input())
a = [int(i) for i in input().split()]

cnt = 0
while True:
  flag = True
  for i in range(n):
    if a[i] % 2 == 0:
      a[i] //= 2
    else:
      flag = False
  if flag:
    cnt += 1
  else:
    break
      
print(cnt)
# Judge status: Accepted
N = int(input())
CSFlist = [tuple(map(int, input().split())) for _ in range(N - 1)]
for i in range(N):
    now = 0
    for c, s, f in CSFlist[i:]:
        now = max(now, s)
        now += (f - now % f) if now % f != 0 else 0
        now += c
    print(now)
# Judge status: Accepted
a, b, c = map(int, input().split())
k = int(input())
list = [a, b, c]
max = max(list)
if a == max:
    print(b+c+a*2**k)
elif b == max:
    print(a+c+b*2**k)
else:
    print(a+b+c*2**k)
# Judge status: Accepted
w = ['Sunny', 'Cloudy','Rainy']
S = input()
i = w.index(S)
print(w[(i+1) % 3])
# Judge status: Accepted
import math

X=int(input())

root = math.floor(X**0.2)
half = root//2 - 5

while root > half:
    root2 = int((X-root**5)**0.2)
    if root**5 + root2**5 == X:
        print(int(root),-int(root2))
        exit()
    root -= 1

root = math.ceil(X**0.2)

while True:
    root2 = int((root**5-X)**0.2)
    if root**5 - root2**5 == X:
        print(int(root),int(root2))
        exit()
    root+=1
# Judge status: Accepted
INF = 1 << 60

n = int(input())
x = [0 for i in range(n)]
l = [0 for i in range(n)]
for i in range(n):
    x[i], l[i] = map(int, input().split())

itv = [[x[i] - l[i], x[i] + l[i]] for i in range(n)]
itv.sort(key=lambda x:x[1])
# print("itv =", itv)

ans = 0
t = -INF
for i in range(n):
    if t <= itv[i][0]:
        ans += 1
        t = itv[i][1]
print(ans)
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
if a!=b!=c:
  print(3)
elif a==b!=c or a!=b==c or b==a!=c:
  print(2)
else:
  print(1)
# Judge status: Accepted
a=int(input())

dp = [[0 for i in range(10)] for j in range(10)]

for i in range(a+1):
    if i%10 == 0:
        continue
    x = str(i)
    dp[int(x[0])][int(x[-1])] += 1


count = 0

for i in range(10):
    for w in range(10):
        count += dp[i][w]*dp[w][i]

print(count)
# Judge status: Wrong Answer
N = int(input())
A = []
for _ in range(N):
  A += [int(input())]
Amax = max(A)
Amax2 = sorted(A, reverse=True)[1]
for i in range(N):
  print(Amax if i != Amax else Amax2)
# Judge status: Accepted
N = int(input())
W = [input()]
for i in range(1, N):
    w = input()
    if w not in W and w[0] == W[i-1][-1]:
        W.append(w)
    else:
        print('No')
        exit()
print('Yes')
# Judge status: Accepted
k = int(input())
print(k//2 * ((k+1)//2))
# Judge status: Accepted
N=int(input())
P=map(int, input().split())
ans=0
mv=N
for p in P:
    if p<=mv:
        ans+=1
        mv=p
print(ans)
# Judge status: Accepted
a = input().split()
a = "".join(a)
a= int(a)

if a % 4==0:
    print("YES")
else:
    print("NO")
# Judge status: Wrong Answer
s = list(input())
t = list(input())
n = len(s)

s_par = [i for i in range(n + 1)]
t_par = [i for i in range(n + 1)]

def operation(x, par):
    for i in range(n):
        for j in range(i):
            if x[i] == x[j]:
                par[i] = par[j]
                return par

if operation(s, s_par) == operation(t, t_par):
    print('Yes')
else:
    print('No')
# Judge status: Accepted
divide = ["dream", "dreamer", "erase", "eraser"]
S = input()[::-1]
for i in range(4): divide[i] = divide[i][::-1]

can = True
i = 0
while i < len(S):
  can2 = False
  for d in divide:
    if S[i:i+len(d)] == d:
      can2 = True
      break
  i += len(d)*(can2)
  if not can2:
    can = False
    break
print("YNEOS"[~can%2::2])
# Judge status: Wrong Answer
def divisore(n):
    divisors=[]
    for i in range(1,int(n**0.5)+1):
        if n%i==0:
            divisors.append(i)
            if i!=n//i:
                divisors.append(n//i)
    divisors.sort(reverse=True)
    return divisors

n,m=map(int,input().split())
l=divisore(m)
print(l)
for i in l:
 if m/n>=i:
  print(i)
  exit()
# Judge status: Wrong Answer
N = int(input())
A = list(map(int, input().split()))
B = [abs(a) for a in A]
t = min(B)
fu = 0
for a in A:
  if a < 0:
    fu += 1
print(sum(B)-t if fu%2 else sum(B))
# Judge status: Accepted
n, m = map(int, input().split())

s = []
for i in range(n):
   tmp = [int(x) for x in input().split()]
   s.append(tmp)

c = []
for i in range(m):
   tmp = [int(x) for x in input().split()]
   c.append(tmp)

for i in range(n):
   d1 = []
   for j in range(m):
      d2 = abs(s[i][0] - c[j][0]) + abs(s[i][1] - c[j][1])
      d1.append(d2)

   print(d1.index(min(d1)) + 1)
# Judge status: Wrong Answer
N=int(input())
import sys
a=list(input())
b=a
b.sort()
c=0
for i in range(N):
  if a[i]!=b[i]:
    c+=1
    if c>=2:
      d='No'
      sys.exit()
print('Yes')
# Judge status: Accepted
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    A, B = map(int, readline().split())

    if A <= 8 and B <= 8:
        print("Yay!")
    else:
        print(":(")


if __name__ == '__main__':
    main()
# Judge status: Accepted
N = int(input())
X = int(-(-N // 1.08))
print(X if int(X * 1.08) == N else ':(')
# Judge status: Wrong Answer
h = int(input())
w = int(input())
m = int(input())
total = 0
if h < w:
  h,w = w,h
for i in range(w):
  total += h
  if total >= m:
    print(i+1)
# Judge status: Accepted
r=input().split()
N=int(r[0])
D=int(r[1])
d=[[int(s) for s in input().split()] for i in range(N)]
ans=0
for i in range(N-1):
    for j in range(i+1,N):
        dis=0
        for k in range(D):
            dis+=(d[i][k]-d[j][k])**2
        ans_pre=dis**(1/2)
        if type(ans_pre)==int or ans_pre.is_integer()==True:
            ans+=1
print(ans)
# Judge status: Accepted
x,a,b = map(int,input().split())

if a>=b: print('delicious')
elif a+x+1>b: print('safe')
else: print('dangerous')
# Judge status: Wrong Answer
import math

def main():
	N = int(input())
	A = [int(a) for a in input().split(" ")]
	B = [0] * N
	for i in range(1, N):
		for j in range(math.ceil(N / (i + 1)), math.floor(N / i) + 1):
			ball = 0
			for k in range(2 * j, N, j):
				if B[k - 1] == 1:
					ball += 1
			B[j - 1] = (ball % 2 + A[j - 1]) % 2
	ans = [str(x + 1) for x, v in enumerate(B) if v == 1]
	print(len(ans))
	print(" ".join(ans))

main()
# Judge status: Accepted
n=int(input())
s=set()
for i in range(n):
    a=int(input())
    if a in s:
        s.remove(a)
    else:
        s.add(a)
print(len(s))
# Judge status: Accepted
N,K=[int(s) for s in input().split()]
maruta=[int(s) for s in input().split()]

def possible(x):
  cut=0
  for e in maruta:
    if e%x==0:
      cut+=(e//x-1)
    else:
      cut+=e//x
  if cut<=K:
    return True
  else:
    return False

a=1
b=max(maruta)
while b-a>1:
  c=(a+b)//2
  if possible(c):
    b=c
  else:
    a=c

if possible(1):
  print(1)
else:
  print(b)
# Judge status: Accepted
x = int(input())

from math import gcd

print(360 // gcd(x, 360))
# Judge status: Accepted
n,w = map(int,input().split())

items = [list(map(int,input().split())) for i in range(n)]

dp = [[0]*(w+1) for i in range(n+1)]

for i in range(n):
    for j in range(w+1):
        if j >= items[i][0]:
            dp[i+1][j] = max(dp[i+1][j], dp[i][j-items[i][0]] + items[i][1])
            
        dp[i+1][j] = max(dp[i+1][j], dp[i][j])

print(dp[n][w])
# Judge status: Wrong Answer
#!python3

iim = lambda: map(int, input().rstrip().split())

def resolve():
    s = input()

    print("Yes" if s[2] == s[3] and s[4] and s[5] else "No")

if __name__ == "__main__":
    resolve()
# Judge status: Accepted
S = input()
ans = 0
for a, b in zip(S, S[::-1]):
    if a != b:
        ans += 1
print(ans//2)
# Judge status: Accepted
N=int(input())
D=list(map(int,input().split()))
mod=998244353

if D[0]!=0:
    print(0)
    exit()


B=[0]*N
for d in D:
    B[d]+=1
if B[0]!=1:
    print(0)
    exit()

ans=1
total=1
for i in range(1,N):
    if B[i]==0:
        if total!=N:
            print(0)
            exit()
        else:break
    total+=B[i]
    ans*=(B[i-1]**B[i])
    ans%=mod

print(ans)
# Judge status: Wrong Answer
l,r = map(int,input().split())
i = -(-l//2019)
if 2019*i<=r:
    print(0)
else:
    if r%2019<l%2019:
        print(r%2019*(r-1)%2019)
    else:
        print(l%2019*(l+1)%2019)
# Judge status: Accepted
#!/usr/bin/env python3


def main():
    s = input()
    if s == "ABC":
        print("ARC")
    else:
        print("ABC")


if __name__ == "__main__":
    main()
# Judge status: Accepted
import math
print(int(2**(math.log2(int(input())) // 1 + 1) - 1))
# Judge status: Wrong Answer
n,a,b = [int(i) for i in input().split()]
mod = 10**9+7

from operator import mul
from functools import reduce

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

sum_num = 0
for r in range(1,n+1):
  a = cmb(n,r)%mod
  sum_num =+ a

print(sum_num%mod)
# Judge status: Wrong Answer
def t():
    N = int(input())
    A = list(map(int, input().split()))
    T = 1
    for i in A:
        while T < 10:
            T *= i
            return T
        return -1
print(t())
# Judge status: Accepted
n=int(input())
l=list(map(int,input().split()))
an=0;md=10**9+7
suf=[0]*n
suf[-1]=l[-1]
for i in range(n-2,-1,-1):
  suf[i]=suf[i+1]+l[i]
for i in range(n-1):
  an=(an+l[i]*suf[i+1])%md
print(an)
# Judge status: Wrong Answer
def myAnswer(N:int,H:list) -> str:
   pre = H.pop(0)
   for h in H:
      if(pre > h):
         if((pre - h) == 1):
            pre = pre - 1
         else:
            return "No"
      else:
         pre = h
   return "Yes"


def modelAnswer():
   tmp=1
def main():
   N = int(input())
   H = list(map(int,input().split()))
   print(myAnswer(N,H[:]))
if __name__ == '__main__':
   main()
# Judge status: Wrong Answer
s = [input() for i in range(1)] 
li = list(map(int, s[0].split()))
t = li[0]
a = li[2]
for i in range(0,100):
    if i % 2 == 0:
        a = a - li[1]
        if a <= 0:
            print("Yes")
            break
    if i % 2 == 1:
        t = t - li[3]
        if t <= 0:
            print("No")
            break
# Judge status: Accepted
x = int(input())
if x==7 or x==5 or x==3:print("YES")
else:print("NO")
# Judge status: Accepted
n=int(input())
p=list(map(int,input().split()))
flag=2*10**5+1
ans=0
for i in range(n):
    if flag>int(p[i]):
        ans+=1
    flag=min(flag,p[i])
print(ans)
# Judge status: Accepted
from collections import Counter

s=input()

n=len(Counter(s))

if n==len(s):
  ans="yes"
else:
  ans="no"
  
print(ans)
# Judge status: Accepted
n = int(input())
s = [input() for _ in range(n)]

d = [float("inf")]*26
for i in range(n):
    e = [0]*26
    for si in s[i]:
        e[ord(si) - 97] += 1
    for i in range(26):
        d[i] = min(d[i], e[i])

ans = ""
for i in range(26):
    ans += chr(i + 97) * d[i]

print(ans)
# Judge status: Wrong Answer
H = int(input())
W = int(input())
N = int(input())

print(min(-(-H//N), -(-W//N)))
# Judge status: Accepted
A,B,N=map(int,input().split())
x=min(B-1,N)
print((A*x)//B-A*(x//B))
# Judge status: Accepted
s = input()
if s == "Sunny":
    print("Cloudy")
elif s == "Cloudy":
    print("Rainy")
elif s == "Rainy":
    print("Sunny")
# Judge status: Accepted
s = input()

t = ""
for c in s :
  if c != 'B' :
    t += c
  else :
    if t : t = t[0:-1]
    
print(t)
# Judge status: Accepted
a,b,c = map(int,input().split())

if a+b+c>=22:
    print("bust")
else:
    print("win")
# Judge status: Wrong Answer
a,b,h=map(int,open(0));print(a*b*(h/2))
# Judge status: Accepted
n = int(input())
h_list = list(map(int, input().split()))

ans = 0
tmp_ans = 0
current = h_list[0]
for h in h_list[1:]:
    if h <= current:
        tmp_ans += 1
    else:
        ans = max(tmp_ans, ans)
        tmp_ans = 0
    current = h

ans = max(tmp_ans, ans)
print(ans)
# Judge status: Accepted
# 1 <= N <= 10**5
# N <= M <= 10**9
import sys
input = sys.stdin.buffer.readline
N, M = map(int, input().split())

V = M // N

ans = 1
for i in range(1, V + 1):
    if i * i > M:
        break
    if M % i == 0:
        j = M // i
        if j <= V:
            ans = max(ans, j)
        else:
            ans = max(ans, i)
print(ans)
# Judge status: Accepted
n=int(input())
cnt=[0]*(n+1)

for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            tmp=x*x + y*y + z*z + x*y + y*z + z*x
            if tmp <=n:
                cnt[tmp]+=1


for i in range(1, n+1):
    print(cnt[i])
# Judge status: Wrong Answer
from itertools import groupby
inputs = open(0).readlines()
n = int(inputs[0])
*D, = map(int, inputs[1].split())
D.sort()
mod = 998244353

keys, nodes = [], [] 
for k, g in groupby(D):
    keys.append(k)
    nodes.append(len(list(g)))

if nodes[0] != 1 or all(i == k for i, k in enumerate(keys)):
    print(0)
else:
    patterns = [1]
    for n0, n1 in zip(nodes, nodes[1:]):
        patterns.append(patterns[-1] * pow(n0, n1, mod) % mod)
    print(patterns[-1])
# Judge status: Accepted
N, M = map(int, input().split())
if N%2==0:
    for i in range(M):
        x = 0
        if i>=M/2:
            x = 1
        a = 1 + i
        b = N - i
        print(a+x, b)
else:
    n = (N//2)*2
    for i in range(M):
        a = 1 + i
        b = a + n - (2*i+1)
        print(a, b)
# Judge status: Accepted
import sys
input = sys.stdin.readline
from collections import deque

n = int(input())
a = [int(input()) for _ in range(n)]

s = deque([a[0]])

from bisect import bisect_left

for i in a[1:]:
    if i <= s[0]:
        s.appendleft(i)
    else:
        s[bisect_left(s, i) - 1] = i

# print(s)
print(len(s))
# Judge status: Accepted
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if e-a <= k:
  print('Yay!')
else:
  print(':(')
# Judge status: Wrong Answer
n,k = map(int,input().split())
a = list(map(int,input().split()))

ni = a.index(1)

ans = ni//(k-1)+1 +(n-ni-1 + ni%(k-1))//(k-1)+1
print(ans)
# Judge status: Wrong Answer
S = list(input())
P = set(["A","C","T","G"])
count = 0
if P&set(S) == set():
  print(0)
  exit()
else:
  for i in range(1,len(S)-1):
    for j in range(i+1, len(S)):
      if set(S[i:j])-P == set():
        count = max(count,j-i)
        
print(count)