Problem:
 Score : 400 points    Problem Statement You are going out for a walk, when you suddenly encounter N monsters. Each monster has a parameter called health , and the health of the i -th monster is h_i at the moment of encounter. A monster will vanish immediately when its health drops to 0 or below.  Fortunately, you are a skilled magician, capable of causing explosions that damage monsters. In one explosion, you can damage monsters as follows:   Select an alive monster, and cause an explosion centered at that monster. The health of the monster at the center of the explosion will decrease by A , and the health of each of the other monsters will decrease by B . Here, A and B are predetermined parameters, and A > B holds.   At least how many explosions do you need to cause in order to vanish all the monsters?      Constraints  All input values are integers.  1 ≤ N ≤ 10^5  1 ≤ B < A ≤ 10^9  1 ≤ h_i ≤ 10^9         Input Input is given from Standard Input in the following format:  N  A  B  h_1  h_2  :  h_N       Output Print the minimum number of explosions that needs to be caused in order to vanish all the monsters.        Sample Input 1 4 5 3
8
7
4
2      Sample Output 1 2  You can vanish all the monsters in two explosion, as follows:   First, cause an explosion centered at the monster with 8 health. The healths of the four monsters become 3 , 4 , 1 and -1 , respectively, and the last monster vanishes.  Second, cause an explosion centered at the monster with 4 health remaining. The healths of the three remaining monsters become 0 , -1 and -2 , respectively, and all the monsters are now vanished.        Sample Input 2 2 10 4
20
20      Sample Output 2 4  You need to cause two explosions centered at each monster, for a total of four.       Sample Input 3 5 2 1
900000000
900000000
1000000000
1000000000
1000000000      Sample Output 3 800000000

Solution (Python):
from math import ceil

N, A, B = map(int, input().split())
h = [int(input()) for _ in range(N)]

def enough(t):
    cnt = 0
    
    for hp in h:
        cnt += ceil(max(0, (hp - B * t)/(A-B)))
        
    if cnt <= t:
        return True
    else:
        return False

high = ceil(max(h) / B)
low = 0

while high - low > 0:
    mid = (high + low) // 2
    if enough(mid):
        high = mid
    else:
        low = mid + 1

print(low)

Solution (Python):
from math import ceil
n, a, b = map(int, input().split())
h = [int(input()) for i in range(n)]

def enough(t):
    count = 0
    for hp in h:
        count += ceil(max(0, hp - b*t) / (a-b))
    if(count <= t):
        return True
    else:
        return False


high = ceil(max(h)/b)
low = 0
while(high - low > 0):
    mid = (high + low) // 2
    if(enough(mid)):
        high = mid
    else:
        low = mid + 1
print(low)

Solution (Python):
from math import ceil

N, A, B = map(int, input().split())
h = []
for _ in range(N):
    h.append(int(input()))
    
left = 0
right = max(h)//B + 1

while right - left > 1:
    mid = (right + left) // 2
    c = sum([ceil((hi-mid*B)/(A-B)) for hi in h if hi > mid * B])
    if c > mid:
        left = mid
    else:
        right = mid
        
print(right)

Solution (Python):
from math import ceil

N, A, B = map(int, input().split())
H = []
for _ in range(N):
    H.append(int(input()))
    
left = 0
right = max(H)//B + 1

while right - left > 1:
    mid = (right + left) // 2
    c = sum([ceil((h-B*mid)/(A-B)) for h in H if h > B*mid])
    
    if c > mid:
        left = mid
    else:
        right = mid
print(right)

Solution (Python):
from collections import defaultdict
from math import ceil


def can_kill(total, A, B, h_list):
    add = A - B
    num = 0
    for h in h_list:
        h -= B * total
        num += ceil(h / add)
        if num > total:
            return False
    return True


def main():
    N, A, B = map(int, input().split())
    h_list = list(sorted([int(input()) for _ in range(N)], reverse=True))

    left, right = -1, 10 ** 10
    ans = 0
    while right - left > 1:
        m = (left + right) // 2
        if can_kill(m, A, B, h_list):
            ans = m
            right = m
        else:
            left = m
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):

n,a,b = list(map(int, input().split()))
h = []
for i in range(n):
    h.append(int(input()))

import math as m

imin = 1
imax = sum([hh // a + 1 for hh in h])

while ( imax > imin+1 ):
    num = imin + (imax-imin)//2
    acnt = sum([m.ceil((hi- b*num)/(a-b)) for hi in h  if (hi- b*num)>0])
    if ( acnt<=num ):
        imax = num
    else:
        imin = num
print(imax)

Solution (Python):
n,a,b = list(map(int, input().split()))
h = []
for i in range(n):
    h.append(int(input()))

import math as m

imin = 1
imax = sum([hh // a + 1 for hh in h])

while ( imax > imin+1 ):
    num = imin + (imax-imin)//2
    acnt = sum([m.ceil((hi- b*num)/(a-b)) for hi in h  if (hi- b*num)>0])
    if ( acnt<=num ):
        imax = num
    else:
        imin = num
print(imax)

Solution (Python):
n,a,b = list(map(int, input().split()))
h = []
for i in range(n):
    h.append(int(input()))

import math

sup = sum([hh // a + 1 for hh in h])
inf = 1
 
while sup - inf > 1:
    x = (sup + inf) // 2
    c = sum([math.ceil((hh - x * b)/(a-b)) for hh in h if hh > x * b])
    if c <= x:
        sup = x
    else:
        inf = x
 
print(sup)

Solution (Python):
import numpy as np
import math

N,A,B = map(int, input().split())
h = np.zeros(N)

for i in range(N) :
    h[i] = int(input())

ans = 0
mn = 0
mx = np.ceil(h.max()/B)
now = mx//2
while (mx-mn) > 1 :
    tmp = h-B*now
    if now >= sum(np.ceil(tmp[tmp>0]/(A-B))) :
        mx = now
    else :
        mn = now

    now = (mx+mn)//2

print(int(mx))

Solution (Python):
import numpy as np
import math

N,A,B = map(int, input().split())
h = np.zeros(N)

for i in range(N) :
    h[i] = int(input())

ans = 0
mn = 0
mx = np.ceil(h.max()/B)
now = mx//2
while mx != mn :
    if (mx-mn) == 1 :
        tmp_mx = h-B*mx
        tmp_mn = h-B*mn
        T_mx = sum(np.ceil(tmp_mx[tmp_mx>0]/(A-B)))
        T_mn = sum(np.ceil(tmp_mn[tmp_mn>0]/(A-B)))

        if T_mn == mn :
            ans = mn
        else :
            ans = mx

        break

    tmp = h-B*now
    T = sum(np.ceil(tmp[tmp>0]/(A-B)))
    if now >= T :
        ans = now
        mx = now
    else :
        mn = now

    now = (mx+mn)//2

print(int(ans))

Solution (Python):
import math

def calc(H, T, a, b):
    cnt = 0
    for h in H:
        if (h -b*T) >= 0:
            cnt += math.ceil((h - b * T) / (a - b))
    if cnt <= T:
        return True
    else:
        return False

tmp = [int(n) for n in input().split()]
a = tmp[1]
b = tmp[2]
H = []

H = sorted([int(input()) for i in range(tmp[0])])[::-1]
minT = 0
maxT = math.ceil(H[0] / b)
T = int((maxT + minT) / 2)

while True:
    T = math.ceil((maxT + minT) / 2)
    if calc(H, T, a, b):
        maxT = T
    else:
        minT = T
    if maxT - minT <= 1:
        break
print(maxT)

Solution (Python):

import math

N, A, B = map(int, input().split(' '))
hn = [int(input()) for i in range(N)]

maxT = max(hn) // B + 1
minT = 0

def enough(T):
    count = sum([math.ceil((h - B*T) / (A-B)) if (h - B*T) >= 0 else 0 for h in hn])
    return True if count <= T else False

while True:
    med = (maxT + minT) // 2
    if enough(med):
        maxT = med
    else:
        minT = med
    if maxT - minT <= 1:
        break
print(maxT)

Solution (Python):

import math

N, A, B = map(int, input().split(' '))
hn = sorted([int(input()) for i in range(N)])

maxT = hn[-1] // B + 1
minT = 0

def enough(T):
    count = sum([math.ceil((h - B*T) / (A-B)) if (h - B*T) >= 0 else 0 for h in hn])
    return True if count <= T else False

while True:
    med = (maxT + minT) // 2
    if enough(med):
        maxT = med
    else:
        minT = med
    if maxT - minT <= 1:
        break
print(maxT)

Solution (Python):

import math

N, A, B = map(int, input().split(' '))
hn = sorted([int(input()) for i in range(N)])

maxT = int(hn[-1] / B) + 1
minT = 0

def enough(T):
    count = sum([math.ceil((h - B*T) / (A-B)) if (h - B*T) >= 0 else 0 for h in hn])
    return True if count <= T else False

while True:
    med = int((maxT + minT) / 2)
    if enough(med):
        maxT = med
    else:
        minT = med
    if maxT - minT <= 1:
        break
print(maxT)

Solution (Python):

import math
import sys

line = input().split(' ')
N = int(line[0])
A = int(line[1])
B = int(line[2])
hn = sorted([int(input()) for i in range(N)])

maxT = int(hn[-1] / B) + 1
minT = 0

def enough(T):
    count = sum([math.ceil((h - B*T) / (A-B)) if math.ceil((h - B*T) / (A-B)) >= 0 else 0 for h in hn])
    return True if count <= T else False

while True:
    med = int((maxT + minT) / 2)
    if enough(med):
        maxT = med
    else:
        minT = med
    if maxT - minT <= 1:
        break
print(maxT)

Solution (Python):
import math

N, A, B = map(int, input().split())
h = []
for i in range(N):
    h.append(int(input()))


def enough(T):
    h2 = list(map(lambda x: x - B * T, h))
    return sum(map(lambda x: max(0, math.ceil(x / (A - B))), h2)) <= T


def solver(inf, sup):
    mid = (inf + sup) // 2
    if inf == sup:
        return mid
    elif enough(mid):
        return solver(inf, mid)
    else:
        return solver(mid + 1, sup)


t = 10 ** 9

print(solver(0, t))

Solution (Python):
from math import ceil
N, A, B = map(int, raw_input().split(' '))
h = [int(raw_input()) for _ in range(N)]

def enough(T):
    bt = B * T
    ab = A - B
    atk = sum([ceil(float(v - bt) / ab) for v in h if v > bt])
    if atk <= T:
        return True
    return False

l = 0
r = max(h) / B + 1
while r - l > 1:
    T = (l + r) / 2
    if enough(T):
        r = T
    else:
        l = T
if r == 2:
    if enough(1):
        r = 1
print r

Solution (Python):

import math

N, A, B = map(int, input().split())
h = [int(input()) for i in range(N)]


def enough(T):
    atack = B * T
    diff = A - B
    count = 0
    for i in h:
        tmp = math.ceil((i - atack) / diff)
        if tmp > 0:
            count += tmp

    return count<=T


def tree():
    low = 0
    high = 10 ** 9
    while high - low > 1:
        mid = (low + high) // 2
        if enough(mid):
            high = mid
        else:
            low = mid
    return high


print(tree())

Solution (Python):

import math

N, A, B = map(int, input().split())
monster = [int(input()) for i in range(N)]


def enough(T):
    attack = B * T
    diff = A-B
    count = 0
    for i in monster:
        tmp = math.ceil((i - attack)/diff)
        if tmp > 0:
            count += tmp

    if count <= T:
        return True
    else:
        return False

def bs():
    left = 0
    right = 1000000000

    while left < right:
        mid = (left + right) // 2
        if enough(mid):
            right = mid
        else:
            left = mid + 1
    return left

print(bs())

Solution (Python):
n, a, b = map(int, input().split())
h = []
for i in range(n):
    h.append(int(input()))


def enough(T):
    total = 0
    for x in h:
        if x >= b * T:
            q, r = divmod(x - b * T, a - b)
            ceiling = q + int(r != 0)
            total += ceiling
    return total <= T


l = 0
r = 10 ** 9
while r - l > 1:
    m = (l + r) // 2
    if enough(m):
        r = m
    else:
        l = m
print(r)

Solution (Python):
import math
import sys



N, A, B = [int(_) for _ in input().split()]
H = sorted([int(input()) for _ in range(N)])

sup = 10 ** 9
inf = 0

while sup - inf > 1:
    x = (sup + inf) // 2
    c = sum([math.ceil((h - x * B) / (A - B)) for h in H if h > x * B])
    if c <= x:
        sup = x
    else:
        inf = x

print(sup)

Solution (Python):
import math

n, a, b = map(int, input().split(" "))

h = []
for i in range(n):
    h.append(int(input()))

h.sort(reverse=True)


def check(count_target, h, a, b):
    count = 0

    for i in h:
        if i >= count_target * b:
            count += math.ceil((i - count_target * b) / (a - b))
    return count_target - count


l = 1
r = math.ceil(h[0] / b)


while r - l > 1:
    mid = math.floor(l + (r - l) / 2)

    if check(mid, h, a, b) < 0:
        l = mid
    else:
        r = mid


if check(l, h, a, b) < 0:
    print(int(r))
else:
    print(int(l))

Solution (Python):
def check(N,A,B,h,K):
    sum = 0
    for i in range(N):
        x = -((-h[i]+B*K)//(A-B))
        sum += x if x>0 else 0
    return sum<=K

N, A, B = list(map(int,input().split()))
h=[0]*N
for i in range(N):
    h[i] = int(input())

ok = 1000000000
ng = 0
while abs(ok -ng)>1:
    mid = (ok+ng)//2
    if check(N,A,B,h,mid):
        ok = mid
    else:
        ng = mid
print(ok)

Solution (Python):
import math

def bs(n, a, b, hp, min=0, max=10**9):
    left = min
    right = max
    def count(num):
        base = b * num
        attackcount = 0
        diff = a-b
        for i in range(n):
            tmp = math.ceil((hp[i] - base) / diff)
            if tmp <= 0:
                pass
            else:
                attackcount += tmp
        if attackcount <= num:
            return True
        else:
            return False
    while left != right:
        mid = (left + right) // 2
        if count(mid):
            right = mid
        else:
            left = mid + 1
    return left

if __name__ == '__main__':
    n, a, b = map(int, input().split())
    hp = [int(input()) for i in range(n)]
    print(bs(n, a, b, hp))

Solution (Python):
import math

def enough(n):
    whole_damage = B * n
    if (SUM > whole_damage*N + (A-B)*n):
        return False
    if (MAX <= whole_damage):
        return True
    arr = filter(lambda hp: hp > whole_damage, HPS)
    atk_times = 0
    for hp in arr:
        atk_times += int(math.ceil((hp - whole_damage)*1.0 / (A-B)))
        if atk_times > n:
            return False
    else:
        return True

N,A,B = map(int, raw_input().split())
HPS = [input() for i in range(N)]
MAX = max(HPS)
SUM = sum(HPS)

left = 1
right = MAX/B + 1
while left < right:
    mid = (left + right)/2
    if enough(mid):
        right = mid
    else:
        left = mid + 1
print right

Solution (Python):
import math


def C(_mid):
    tmp = [x - B * _mid for x in h]
    explode_count = 0
    for i in range(0, len(tmp)):
        if tmp[i] <= 0:
            pass
        else:
            explode_count += math.ceil(tmp[i] / (A - B))

    if _mid < explode_count:
        return True
    else:
        return False


if __name__ == '__main__':
    N, A, B = list(map(int, input().split()))

    h = [int(input()) for i in range(N)]

    lb = 0
    ub = 1000000000
    while ub - lb > 1:
        mid = int((lb + ub) / 2)
        if C(mid):
            lb = mid
        else:
            ub = mid

    print(ub)

Solution (Python):
import math
 
def check(x):
    k = 0
    global h, a, b
    for i in h:
        if x * b < i:
            k += math.ceil((i - x * b) / (a - b))
    return k <= x
 
 
n, a, b = map(int, input().split())
h = []
for i in range(n):
    h.append(int(input()))
l = -1
r = max(h) // b + 1
while r - l > 1:
    m = (l + r) // 2
    if check(m):
        r = m
    else:
        l = m
print(r)

Solution (Python):

myon_chache={}
def turn_check(zikan,direct,around):
    nokori_naka=zikan
    for idx in range(0,N,1):
        rem_hp=kirei_HP[idx]-around*zikan
        if rem_hp > 0:
            if rem_hp in myon_chache:
                myon=myon_chache[rem_hp]
            else:
                myon= rem_hp//(direct-around) + (0 if rem_hp%(direct-around)==0 else 1)
                myon_chache[rem_hp]=myon
        
            nokori_naka=nokori_naka-myon
            if nokori_naka < 0:
                return False
        else: 
            return True

    return True


mozir=input()
hyo=mozir.split(' ')
N=int(hyo[0])
A=int(hyo[1])
B=int(hyo[2])

HP=[]
for idx in range(0,N,1):
    HP.append(int(input()))

kirei_HP=sorted(HP,reverse=True)
dmg_mean= B
kagen=kirei_HP[0]// dmg_mean + 1
tansaku=kagen//2
ite=0
dame_jogen=0
while True:
    ite=ite+1
    if turn_check(tansaku,A,B):
        kagen=tansaku
        tansaku=(kagen+dame_jogen)//2
    else:
        if tansaku + 1 == kagen: 
            break
        else:
            dame_jogen=tansaku
            tansaku=(tansaku+kagen)//2


print(kagen)

Solution (Python):
import math
N,A,B=map(int,input().split())
S=[]
for i in range(N):
  S+=[int(input())] 
S.sort(reverse=1)
count=0

def Check(T):
  count=0
  for i in range(N):
    a=math.ceil((S[i]-B*T)/(A-B))
    if a>0:
      count+=a
    else:
      break
  if count<=T:
    return 1
  else:
    return 0

L=1
while True:
  if S[0]/B >=2**L:
    L+=1
  else:
    break

T=2**L
for l in range(L,0,-1):
  if Check(T)==1:
    T-=2**(l-1)
  elif Check(T)==0:
    T+=2**(l-1)
if Check(T)==0:
  print(T+1)
else:
  print(T)

Solution (Python):
def d():
    n, a, b = map(int, input().split())
    l = [int(input()) for _ in range(n)]
    d = a - b

    left = 0
    right = 10**9

    def is_ok(t):
        return sum(map(lambda x: max(0, x - b*t + d-1) // d, l)) <= t

    while abs(left - right) > 1:
        now = (left + right) // 2
        if is_ok(now):
            right = now
        else:
            left = now

    print((right, left)[is_ok(left)])

d()

Solution (Python):
import numpy as np
n, a, b = map(int, raw_input().split())
h = []
for i in xrange(n):
    h.append(int(raw_input()))
h = np.array(h)
count = 0
adiff = float(a - b)
top = max(h) / b + 1
bottom = 0
mid = top / 2
while(1):
    if top - bottom < 2:
        break
    hmem = h - b * mid
    if np.sum(np.ceil(hmem[hmem > 0] / adiff)) <= mid:
        top = mid
    else:
        bottom = mid
    mid = (top + bottom) / 2
print top

Solution (Python):
import math

def check(x):
    k = 0
    global h, a, b
    for i in h:
        if x * b < i:
            k += math.ceil((i - x * b) / (a - b))
    return k <= x


n, a, b = map(int, input().split())
h = []
for i in range(n):
    h.append(int(input()))
l = -1
r = max(h) // b + 1
while r - l > 1:
    m = (l + r) // 2
    if check(m):
        r = m
    else:
        l = m
print(r)

Solution (Python):
import numpy as np

n, a, b = map(int, raw_input().split())
l = []

for i in range(n):
	l.append(input())
ll = np.array(l)
ll.sort()
ll = ll[::-1]

def solve(hp, count):
	q = hp - b * count
	p = (q - 1) / (a - b) + 1
	p = p[p > 0]
	if p.sum() <= count:
		return True
	else:
		return False

l = 0
r = ll[0] / b + 1
while r - l > 1:
	m = (l + r) / 2
	if solve(ll, m):
		r = m
	else:
		l = m

print r

Solution (Python):

import numpy as np

n, a, b = map(int, raw_input().split())
l = []

for i in range(n):
	l.append(input())
ll = np.array(l)
ll.sort()
ll = ll[::-1]

def solve(hp, count):
	q = hp - b * count
	t = q > 0

	if a > b:
		p = (q - 1) / (a - b) + 1
	else:
		p = q
	p = p[p > 0]
	if p.sum() <= count:
		return True
	else:
		return False

l = 1
r = ll[0] / b + 1
while r - l > 1:
	m = (l + r) / 2
	if solve(ll, m):
		r = m
	else:
		l = m

if r == 2:
	if solve(ll, 1):
		r = 1

print r

Solution (Python):
import numpy as np

n, a, b = map(int, raw_input().split())
l = []

for i in range(n):
	l.append(input())
ll = np.array(l)
ll.sort()
ll = ll[::-1]


def solve(count):
	q = ll - b * count
	t = q > 0

	if a > b:
		p = (q - 1) / (a - b) + 1
	else:
		p = q
	p = p[p > 0]
	if p.sum() <= count:
		return True
	else:
		return False

l = 1
r = ll[0] / b + 1
while r - l > 1:
	m = (l + r) / 2
	if solve(m):
		r = m
	else:
		l = m

if r == 2:
	if solve(1):
		r = 1

print r

Solution (Python):
import numpy as np

n, a, b = map(int, raw_input().split())
l = []

for i in range(n):
	l.append(input())
ll = np.array(l)
ll.sort()
ll = ll[::-1]


def solve(count, hpList):
	q = hpList - b * count
	t = q > 0

	if a > b:
		p = (q - 1) / (a - b) + 1
	else:
		p = q
	p = p[p > 0]
	if p.sum() <= count:
		return True
	else:
		return False

l = 1
r = ll[0] / b + 1
while r - l > 1:
	m = (l + r) / 2
	if solve(m, ll):
		r = m
	else:
		l = m

if r == 2:
	if solve(1, ll):
		r = 1

print r

Solution (Python):
n, A, B = map(int, input().split())
l = [int(input()) for x in range(n)]

left = 0
right = 10**9


def is_ok(t):
    AB = A - B
    return sum(map(lambda x: max(0, x - B*t + (AB - 1)) // (AB), l)) <= t


while abs(left - right) > 1:
    now = (left + right) // 2
    if is_ok(now):
        right = now
    else:
        left = now

print([right, left][is_ok(left)])

Solution (Python):

import array, bisect, collections, copy, heapq, itertools, math, random, re, string, sys, time

sys.setrecursionlimit(10 ** 7)
INF = 10 ** 20
MOD = 10 ** 9 + 7


def II(): return int(input())
def ILI(): return list(map(int, input().split()))
def IAI(LINE): return [ILI() for __ in range(LINE)]
def IDI(): return {key: value for key, value in ILI()}


def read():
    N, A, B = ILI()
    h = [II() for __ in range(N)]
    return (N, A, B, h)


def bool_exc(h, dif_ab, B, count):
    dif_count = 0
    for mon in h:
        dif_mon = mon - B * count
        if dif_mon <= 0:
            continue
        else:
            dif_count += math.ceil(dif_mon / dif_ab)
            if dif_count > count:
                break

    dif = count - dif_count
    return dif


def solve(N, A, B, h):
    right = max(h) // B + 1
    left = min(h) // A + 1
    dif_ab = A - B
    while left != right:
        mid = (left + right) // 2
        dif = bool_exc(h, dif_ab, B, mid)
        if dif >= 0:
            right = mid
        else:
            left = mid + 1

    ans = left
    return ans


def main():
    params = read()
    print(solve(*params))


if __name__ == "__main__":
    main()

Solution (Python):
import bisect
import heapq
import math
N,A,B =list(map(int,input().split()))
h = [ int(input()) for _ in range(N)]
h.sort()


sp_damage = A-B
"""
heap = []
for hval in h:
    heapq.heappush(heap,-hval)
count = 0
while True:
    if heap[0]  >= -count*B:
        break
    count+=1
    hp = heapq.heappop(heap)
    hp += sp_damage
    heapq.heappush(heap,hp)
print(count)

"""
def nibun(func ,min_ ,max_ ):
    left = min_
    right= max_
    while not(left==right):
        mid = (left+right) //2
        tmp = func(mid)
        if tmp:
            right = mid
        else:
            left = mid+1
    return left

def check(num):
    i = num
    for hval in h:
        rest = hval-B*num
        if rest <= 0 :
            continue
        i -= math.ceil(rest/sp_damage)
        
        
    return i>=0

print(nibun(check,0,1000000000))

Solution (Python):
import math

N, A, B = [int(_) for _ in input().split()]
H = sorted([int(input()) for _ in range(N)])

sup = sum([h // A + 1 for h in H])
inf = 1

while sup - inf > 1:
    x = (sup + inf) // 2
    c = sum([math.ceil((h - x * B)/(A-B)) for h in H if h > x * B])
    if c <= x:
        sup = x
    else:
        inf = x

print(sup)