CodeEff/ECCO huggingface dataset:
# Original solution
n, a, b = list(map(int, input().split()))
h = [int(eval(input())) for _ in range(n)]

import math
def ok(x):
    t = 0
    for i in range(n):
        r = h[i] - b*x
        if r < 0:
            continue
        else:
            t += math.ceil(r/(a-b))
    if t <= x:
        return True
    else:
        return False

l = 0
r = 10**14+1
while l+1 < r:
    c = (l+r)//2
    if ok(c):
        r = c
    else:
        l = c
print(r)

# Optimized solution
n, a, b = list(map(int, input().split()))
H = [int(eval(input())) for _ in range(n)]

def ok(x):
    tot = 0
    for i in range(n):
        if b*x >= H[i]:
            continue
        else:
            r = H[i] - b*x
            if r%(a-b) == 0:
                tot += r//(a-b)
            else:
                tot += r//(a-b)+1
    if tot <= x:
        return True
    else:
        return False

l = 0
r = 10**10
while l+1 < r:
    c = (l+r)//2
    if ok(c):
        r = c
    else:
        l = c
print(r)
# Original solution
N, A, B = list(map( int, input().split()))
H = [0]*N
hmax = 0
for i in range(N):
    h = int( eval(input()))
    H[i] = h
hmax = max(H)
L = 0
R = hmax//B + 1
add = A-B
while L != R:
    now = (L+R)//2
    need = 0
    for i in range(N):
        if H[i] > now*B:
            need += (H[i]-1-now*B)//add + 1
    if need <= now:#うまくいくとき
        R = now
    else:#うまくいかないとき
        L = now+1#うまく行かないので+1している．これがないと無限ループが発生する。
print(L)

# Optimized solution
N, A, B = list(map( int, input().split()))
H = [0]*N
hmax = 0
for i in range(N):
    h = int( eval(input()))
    H[i] = h
hmax = max(H)
L = 0
R = hmax//B + 1
add = A-B
while L != R:
    now = (L+R)//2
    need = 0
    for i in range(N):
        r = H[i] - now*B
        if r > 0:
            need += (r-1)//add+1
    if need <= now:#うまくいくとき
        R = now
    else:#うまくいかないとき
        L = now+1#うまく行かないので+1している．これがないと無限ループが発生する。
print(L)
# Original solution
N, A, B = list(map( int, input().split()))
hmax = 0
H = [ int( eval(input())) for _ in range(N)]
#hmax = max(H)
L = 0
R = 10**9+1#hmax//B + 1
add = A-B
while L != R:
    now = (L+R)//2
    need = 0
    for i in range(N):
        r = H[i] - now*B
        if r > 0:
            need += (r-1)//add+1
    if need <= now:#うまくいくとき
        R = now
    else:#うまくいかないとき
        L = now+1#うまく行かないので+1している．これがないと無限ループが発生する。
print(L)

# Optimized solution
N, A, B = list(map( int, input().split()))
hmax = 0
H = [ int( eval(input())) for _ in range(N)]
hmax = max(H)
L = 0
R = hmax//B + 1
add = A-B
while R-L != 1:#L != R:
    now = (L+R)//2
    need = 0
    for i in range(N):
        r = H[i] - now*B
        if r > 0:
            need += (r-1)//add+1
    if need <= now:#うまくいくとき
        R = now
    else:#うまくいかないとき
        L = now#+1#うまく行かないので+1している．これがないと無限ループが発生する。
print(R)
# Original solution
N,A,B=list(map(int,input().split()))

hlist=[]
for i in range(N):
  hlist.append(int(eval(input())))
mh=max(hlist)
#print(mh,hlist)

def isOK(m):
  if m==0:
    return False
  
  hlist2=list(hlist)
  for i in range(N):
    hlist2[i]-=m*B
  #print(m,hlist2)
  if max(hlist2)<=0:
    return True
  
  cnt=0
  for i in range(N):
    if hlist2[i]>0:
      cnt+=-(-hlist2[i]//(A-B))
  return cnt<=m

l,r=1,mh//B+1
while l<=r:
  mid=(l+r)//2
  #print(l,mid,r)
  if not isOK(mid-1) and isOK(mid):
    print(mid)
    break
  elif isOK(mid-1):
    r=mid-1
  else:
    l=mid+1

# Optimized solution
import sys
input=sys.stdin.readline
N,A,B=list(map(int,input().split()))

hlist=[]
for i in range(N):
  hlist.append(int(eval(input())))
mh=max(hlist)
#print(mh,hlist)

def isOK(m):
  if m==0:
    return False
  
  hlist2=list(hlist)
  for i in range(N):
    hlist2[i]-=m*B
  #print(m,hlist2)
  if max(hlist2)<=0:
    return True
  
  cnt=0
  for i in range(N):
    if hlist2[i]>0:
      cnt+=-(-hlist2[i]//(A-B))
  return cnt<=m

l,r=1,mh//B+1
while l<=r:
  mid=(l+r)//2
  #print(l,mid,r)
  if not isOK(mid-1) and isOK(mid):
    print(mid)
    break
  elif isOK(mid-1):
    r=mid-1
  else:
    l=mid+1
# Original solution
import sys
input=sys.stdin.readline
N,A,B=list(map(int,input().split()))

hlist=[]
for i in range(N):
  hlist.append(int(eval(input())))
mh=max(hlist)
#print(mh,hlist)

def isOK(m):
  if m==0:
    return False
  
  hlist2=list(hlist)
  for i in range(N):
    hlist2[i]-=m*B
  #print(m,hlist2)
  if max(hlist2)<=0:
    return True
  
  cnt=0
  for i in range(N):
    if hlist2[i]>0:
      cnt+=-(-hlist2[i]//(A-B))
  return cnt<=m

l,r=1,mh//B+1
while l<=r:
  mid=(l+r)//2
  #print(l,mid,r)
  if not isOK(mid-1) and isOK(mid):
    print(mid)
    break
  elif isOK(mid-1):
    r=mid-1
  else:
    l=mid+1

# Optimized solution
import sys
input=sys.stdin.readline
N,A,B=list(map(int,input().split()))

hlist=[]
mh=0
for i in range(N):
  h=int(eval(input()))
  hlist.append(h)
  mh=max(mh,h)
#print(mh,hlist)

res_dic={0:False}
def isOK(m):
  if m in res_dic:
    return res_dic[m]
  
  h2list=[]
  mh2=-float("inf")
  for i in range(N):
    h2=hlist[i]-m*B
    h2list.append(h2)
    mh2=max(h2,mh2)
  if mh2<=0:
    res_dic[m]=True
    return res_dic[m]
  
  cnt=0
  for i in range(N):
    if h2list[i]>0:
      cnt+=-(-h2list[i]//(A-B))
      
  res_dic[m]=(cnt<=m)
  return res_dic[m]

l,r=1,-(-mh//B)
while l<=r:
  mid=(l+r)//2
  #print(l,mid,r)
  if not isOK(mid-1) and isOK(mid):
    print(mid)
    break
  elif isOK(mid-1):
    r=mid-1
  else:
    l=mid+1
# Original solution
import math

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

def C(T):
    t = 0
    for i in range(N):
        t += math.ceil((h[i]-B*T)/(A-B))
    if t <= T:
        return True
    else:
        False
l, r = 0, 10**32
while r - l > 1:
    mid = (l+r) // 2
    if C(mid):
        r = mid
    else:
        l = mid


print(r)

# Optimized solution
import math

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

def C(T):
    t = 0
    for i in range(N):
        if h[i] > B*T:
            t += math.ceil((h[i]-B*T)/(A-B))
    if t <= T:
        return True
    else:
        False
l, r = 0, 10**18
while r - l > 1:
    mid = (l+r) // 2
    if C(mid):
        r = mid
    else:
        l = mid


print(r)
# Original solution
def main():
    N, A, B = (int(i) for i in input().split())
    H = [int(eval(input())) for i in range(N)]

    def is_ok(H, mid):
        H = [h - mid*B for h in H]
        need = 0
        for h in H:
            if h > 0:
                need += (h + (A - B) - 1)//(A - B)
        if need <= mid:
            return True
        else:
            return False

    def binary_search_meguru(H):
        ng = -1
        ok = 10**9 + 1
        while abs(ok - ng) > 1:
            mid = ng + (ok - ng) // 2  # 爆破回数
            if is_ok(H, mid):
                ok = mid
            else:
                ng = mid
        return ok

    print((binary_search_meguru(H)))


if __name__ == '__main__':
    main()


# Optimized solution
def main():
    import sys
    input = sys.stdin.buffer.readline
    N, A, B = (int(i) for i in input().split())
    H = [int(eval(input())) for i in range(N)]

    def is_ok(x):
        need = 0
        cur = [0]*N
        for i, h in enumerate(H):
            cur.append(max(0, h - B*x))
        for i, less in enumerate(cur):
            need += (less+(A-B)-1)//(A-B)
        if need <= x:
            return True
        else:
            return False

    def binary_search_meguru():
        ng = -1
        ok = 10**9 + 1
        while abs(ok - ng) > 1:
            mid = ng + (ok - ng) // 2
            if is_ok(mid):
                ok = mid
            else:
                ng = mid
        return ok

    print((binary_search_meguru()))


if __name__ == '__main__':
    main()
# Original solution
N,A,B=list(map(int,input().split()))
H = [int(eval(input())) for _ in range(N)]

def can_eliminate(n): #O(N)
  H_ = [((h-B*n)+A-B-1)//(A-B) for h in H if h>B*n]
  if sum(H_)<=n:
    #print('can eliminate by ' + str(n) +'times')
    return True
  else:
    #print('can not eliminate by ' + str(n) +'times')
    return False
    
def binary_search(l,r): #r:inclusive
  #print('search between ' + str((l,r)))
  if can_eliminate(l):
    return l
  if r==l+1:
    return r
  
  c = (l+r)//2
  if can_eliminate(c):
    return binary_search(l,c)
  else:
    return binary_search(c,r)
  
print((binary_search(1, (sum(H)+2*B+1)//B)))

# Optimized solution
N,A,B=list(map(int,input().split()))
H = [int(eval(input())) for _ in range(N)]

def can_eliminate(n): #O(N)
  H_ = [((h-B*n)+A-B-1)//(A-B) for h in H if h>B*n]
  if sum(H_)<=n:
    #print('can eliminate by ' + str(n) +'times')
    return True
  else:
    #print('can not eliminate by ' + str(n) +'times')
    return False
    
def binary_search(l,r): #r:inclusive
  #print('search between ' + str((l,r)))
  if r==l+1:
    if can_eliminate(l):
      return l
    else:
      return r
  
  c = (l+r)//2
  if can_eliminate(c):
    return binary_search(l,c)
  else:
    return binary_search(c,r)
  
print((binary_search(1, (sum(H)+2*B+1)//B)))
# Original solution
N, A, B = list(map(int, input().split()))
h = [int(eval(input())) for _ in range(N)]
h.sort()


def isOk(k):
    return k >= 0


ok, ng = max(h)//B+1, -1
while abs(ok-ng) > 1:
    mid = (ok+ng)//2
    c = mid
    for i in range(N):
        t = h[i]-mid*B
        if t > 0:
            c -= (t+A-B-1)//(A-B)
            if c < 0:
                break
    if isOk(c):
        ok = mid
    else:
        ng = mid

print(ok)

# Optimized solution
N, A, B = list(map(int, input().split()))
h = [int(eval(input())) for _ in range(N)]
h.sort()


def isOk(k):
    return k >= 0


ok, ng = max(h)//B+1, 0
while abs(ok-ng) > 1:
    mid = (ok+ng)//2
    c = mid
    for i in range(N):
        t = h[i]-mid*B
        if t > 0:
            c -= (t+A-B-1)//(A-B)
            if c < 0:
                break
    if isOk(c):
        ok = mid
    else:
        ng = mid

print(ok)
# Original solution
n,a,b = list(map(int,input().split()))
h = [int(eval(input())) for i in range(n)]
h.sort()
t = a-b
r = 10**9+5
l = 0

while r-l > 1:
    m = (r+l)//2
    mi = m*b
    count = 0
    for i in h:
        if i > mi:
            count += (i-mi+t-1)//t
    if count <= m:
        r = m
    else:
        l = m
print(r)

# Optimized solution
n,a,b = list(map(int,input().split()))
h = [int(eval(input())) for i in range(n)]
t = a-b
r = (max(h)+b-1)//b
l = 0
while r-l > 1:
    m = (r+l)//2
    mi = m*b
    count = 0
    for i in h:
        if i > mi:
            count += (i-mi+t-1)//t
    if count <= m:
        r = m
    else:
        l = m
print(r)
# Original solution
# https://atcoder.jp/contests/abc063/tasks/arc075_b
import sys
import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop
import math
sys.setrecursionlimit(12345678)


def can_delete(ml, t, a, b):
    for i in range(len(ml)):
        ml[i] -= (b * t)

    count = 0
    for m in ml:
        if m > 0:
            count += math.ceil(m/(a-b))

    return t >= count


def main():
    n, a, b = list(map(int, input().split()))
    monsters = []
    for _ in range(n):
        monsters.append(int(eval(input())))

    l = 0
    r = 10**9
    while l < r:
        m = (l + r) // 2
        if can_delete(monsters.copy(), m, a, b):
            r = m
        else:
            l = m + 1

    print(r)


if __name__ == '__main__':
    main()


# Optimized solution
# https://atcoder.jp/contests/abc063/tasks/arc075_b
import sys
import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop
import math
sys.setrecursionlimit(12345678)


def can_delete(ml, t, a, b):
    for i in range(len(ml)):
        ml[i] -= (b * t)

    count = 0
    for m in ml:
        if m > 0:
            count += math.ceil(m/(a-b))

    return t >= count


def main():
    n, a, b = list(map(int, input().split()))
    monsters = []
    for _ in range(n):
        monsters.append(int(eval(input())))

    l = 0
    r = 10**9
    while l < r:
        m = (l + r) // 2
        if can_delete(monsters[:], m, a, b):
            r = m
        else:
            l = m + 1

    print(r)


if __name__ == '__main__':
    main()
# Original solution
n, a, b = list(map(int, input().split()))
h = [int(eval(input())) for _ in range(n)]
 
import math
def ok(x):
    t = 0
    for i in range(n):
        r = h[i] - b*x
        if r < 0:
            continue
        else:
            t += math.ceil(r/(a-b))
    if t <= x:
        return True
    else:
        return False
 
l = 0
r = 10**14+1
while l+1 < r:
    c = (l+r)//2
    if ok(c):
        r = c
    else:
        l = c
print(r)

# Optimized solution
N,A,B = list(map(int,input().split()))
H = []
for _ in range(N):
    h = int(eval(input()))
    H.append(h)

ok = 1000000000
ng = 0

while ok != ng+1:
    mid = (ok+ng)//2
    range_damage = mid*B
    attack_count = 0
    for value in H:
        if range_damage < value:
            if (value - range_damage)%(A-B)==0:
                attack_count += (value - range_damage)//(A-B)
            else:
                attack_count += 1+(value - range_damage)//(A-B)

    if attack_count <= mid:
        ok = mid
    else:
        ng = mid
print(ok)
# Original solution
N, A, B = list(map(int, input().split()))
h_list = [int(eval(input())) for _ in range(N)]
h_list.sort(reverse=True)
h_max = h_list[0]


def add_attack(t):
    attack = B * t
    for i in range(N):
        h = h_list[i]
        h -= attack
        if h > 0:
            t -= (h + (A - B) - 1) // (A - B)
            if t < 0:
                return False
    return True


t_min = 1
t_max = (h_max + B - 1) // B

while t_min < t_max - 1:
    t_mid = (t_min + t_max) // 2
    if add_attack(t_mid):
        t_max = t_mid
    else:
        t_min = t_mid
print(t_max)


# Optimized solution
N, A, B = list(map(int, input().split()))
h_list = [int(eval(input())) for _ in range(N)]
h_max = max(h_list)


def add_attack(t):
    attack = B * t
    for i in range(N):
        h = h_list[i]
        h -= attack
        if h > 0:
            t -= (h + (A - B) - 1) // (A - B)
            if t < 0:
                return False
    return True


t_min = 1
t_max = (h_max + B - 1) // B

while t_min < t_max - 1:
    t_mid = (t_min + t_max) // 2
    if add_attack(t_mid):
        t_max = t_mid
    else:
        t_min = t_mid
print(t_max)
# Original solution
import math

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


def check(t):
    cnt = 0
    ab = A - B
    bt = B * t
    for i in range(N):
        cnt += max(0, math.ceil((h[i] - bt) / ab))
    return cnt <= t


left = 1
right = max(h)
while right - left > 1:
    mid = (left + right) // 2
    if check(mid):
        right = mid
    else:
        left = mid
print(right)


# Optimized solution
import math

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


def check(t):
    cnt = 0
    ab = A - B
    bt = B * t
    for i in range(N):
        r = (h[i] - bt)
        if r <= 0:
            continue
        cnt += r // ab
        if r % ab:
            cnt += 1
    return cnt <= t


left = 1
right = max(h)
while right - left > 1:
    mid = (left + right) // 2
    if check(mid):
        right = mid
    else:
        left = mid
print(right)
# Original solution
from math import ceil

n, a, b = list(map(int, input().split()))
hs = [int(eval(input())) for _ in range(n)]


def defeatable(k):
    hb = [max([h - k * b, 0]) for h in hs]
    n_attack = sum([ceil(h / (a - b)) for h in hb])
    return n_attack <= k


l, r = 0, 10 ** 14

while r - l > 1:
    m = (l + r) // 2

    if defeatable(m):
        r = m
    else:
        l = m

print(r)



# Optimized solution
from math import ceil

n, a, b = list(map(int, input().split()))
hs = [int(eval(input())) for _ in range(n)]


def defeatable(k):
    hb = [max([h - k * b, 0]) for h in hs]
    n_attack = sum([ceil(h / (a - b)) for h in hb])
    return n_attack <= k


l, r = 0, ceil(max(hs) / b)

while r - l > 1:
    m = (l + r) // 2

    if defeatable(m):
        r = m
    else:
        l = m

print(r)
# Original solution
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 = list(map(int, input().split()))
    hp = [int(eval(input())) for i in range(n)]
    print((bs(n, a, b, hp)))


# Optimized solution
def check(T):
    res = 0
    for h in H:
        tmp = (h - B * T + A - B - 1) // (A - B)
        if tmp <= 0:
            break
        res += tmp
    return True if res <= T else False

N, A, B = list(map(int, input().split()))
H = [int(eval(input())) for _ in range(N)]
H.sort(reverse=True)
res = 0
left = 0
right = 10 ** 9
while right != left:
    mid = (left + right) // 2
    if check(mid):
        right = mid
    else:
        left = mid + 1
print(left)
# Original solution
from math import ceil
N, A, B = list(map(int, input().split()))
h = []
for i in range(N):
  h += [int(eval(input()))]

Th = 2*max(h)//B
Tl = 0
while Tl+1<Th:
  t = (Th+Tl)//2
  d = []
  for i in range(N):
    c = h[i]
    d += [c-B*t]
  for i in range(N):
    c = d[i]
    if c<=0:
      continue
    t -= ceil(c/(A-B))
    if t<0:
      Tl = (Th+Tl)//2
      break
  else:
    Th = (Th+Tl)//2
print(Th)


# Optimized solution
N, A, B = list(map(int, input().split()))
h = []
for i in range(N):
  h += [int(eval(input()))]

Th = 2*max(h)//B
Tl = 0
while Tl+1<Th:
  t = (Th+Tl)//2
  d = []
  for i in range(N):
    c = h[i]
    d += [c-B*t]
  for i in range(N):
    c = d[i]
    if c<=0:
      continue
    t -= c//(A-B) if c%(A-B)==0 else c//(A-B)+1
    if t<0:
      Tl = (Th+Tl)//2
      break
  else:
    Th = (Th+Tl)//2
print(Th)
# Original solution
N, A, B , *h = list(map(int, open(0).read().split()))
C = A-B
l = -1
r = 10**20
while l+1<r:
  s = (l+r)//2
  M = [c-s*B for c in h]
  cnt = sum((c+C-1)//C if c>0 else 0 for c in M)
  if cnt>s:
    l = s
  else:
    r = s
print(r)

# Optimized solution
N, A, B , *h = list(map(int, open(0).read().split()))
C = A-B
l = -1
r = 10**12
while l+1<r:
  s = (l+r)//2
  cnt = sum((c-s*B+C-1)//C if c-s*B>0 else 0 for c in h)
  if cnt>s:
    l = s
  else:
    r = s
print(r)
# Original solution
N, A, B = list(map(int,input().split()))
h = [0 for i in range(N)]
for i in range(N):
	h[i] = int(eval(input()))
h = sorted(h)
import math
# N, A, B = 4, 5, 3
# h = [8,7,4,2]
# h = sorted(h,reverse=True)

def enough(T):
	tmp = 0
	for i in range(N):
		if h[i] >= B*T:
			tmp += math.ceil((h[i]-B*T)/(A-B))
	return True if tmp <= T else False

MAX = 10**9
MIN = 0
while MAX > MIN:
	if enough(MAX) == True and enough(MIN) == False and MAX - MIN == 1:
		break
	MID = (MAX+MIN)//2
	if enough(MID) == True:
		if enough(MID-1) == True:
			MAX = MID-1
		else:
			MAX = MID
	else:
		if enough(MID+1) == False:
			MIN = MID+1
		else:
			MIN = MID
print(MAX)



# Optimized solution
N, A, B = list(map(int,input().split()))
h = [0 for i in range(N)]
for i in range(N):
	h[i] = int(eval(input()))
h = sorted(h)
import math
# N, A, B = 4, 5, 3
# h = [8,7,4,2]
# h = sorted(h,reverse=True)

def enough(T):
	tmp = 0
	for i in range(N):
		if h[i] >= B*T:
			tmp += math.ceil((h[i]-B*T)/(A-B))
	return True if tmp <= T else False

MAX = 10**9
MIN = 0
MID = (MAX+MIN)//2
while MAX > MIN+1:
	if enough(MID) == True:
		MAX = MID
	else:
		MIN = MID
	MID = (MAX+MIN)//2
print(MAX)
# Original solution
N,A,B = list(map(int, input().split()))
H = [int(eval(input())) for _ in range(N)]


def f(n, H, A, B): #n回の爆発で魔物を全て倒せるか判定
    c = 0
    for i in range(len(H)):
        t = H[i]
        t -= B*n
        if t > 0:
            c += t//(A-B) + min(1, t%(A-B))
    if c > n:
        return False
    else:
        return True
    
    
def g(u, l, H, A, B): #魔物を倒すことができる爆発の最小回数を二分探索
    if u-l < 2:
        if f(l, H, A, B):
            return l
        else:
            return u
    m = (u+l)//2
    if f(m, H, A, B):
        return g(m, l, H, A, B)
    else:
        return g(u, m, H, A, B)
    
    
ans = g(10**9, 1, H, A, B)
print(ans)

# Optimized solution
N,A,B = list(map(int, input().split()))
H = [int(eval(input())) for _ in range(N)]

def f(n):
    cnt = 0
    flag = True
    for h in H:
        x = (h-B*n)//(A-B) + min((h-B*n)%(A-B), 1)
        cnt += max(0, x)
    if cnt <= n:
        return True
    else:
        return False
        
l = 0
r = 10**9
while r-l > 1:
    m = (r+l)//2
    if f(m):
        r = m
    else:
        l = m
        
if f(l):
    print(l)
else:
    print(r)
# Original solution
# -*- coding: utf-8 -*-
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N, A, B = list(map(int, readline().split()))
H = list(map(int,read().split()))
H = sorted(H,reverse = True)
t = A-B

def solve(x):
    cnt = 0
    for i in range(N):
        rem = H[i]-x*B
        if rem <= 0:
            break
        else:
            cnt += -(-rem // t)
    if cnt <= x:
        return True
    else:
        return False 
    

left = 0
right = 10**9+5
while right - left > 1:
    x = (left + right) // 2
    flag = solve(x)
    if flag:
        right = x
    else:
        left = x
        
print(right)

# Optimized solution
# -*- coding: utf-8 -*-
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N, A, B = list(map(int, readline().split()))
H = list(map(int,read().split()))
H = sorted(H,reverse = True)
t = A-B

def solve(x):
    cnt = 0
    for i in range(N):
        rem = H[i]-x*B
        if rem <= 0:
            break
        else:
            cnt += -(-rem // t)
    if cnt <= x:
        return True
    else:
        return False 
    

left = 0
right = 10**9
while right - left > 1:
    x = (left + right) // 2
    flag = solve(x)
    if flag:
        right = x
    else:
        left = x
        
print(right)
# Original solution
N,A,B = list(map(int, input().split()))
H = [int(eval(input())) for i in range(N)]

def check(X):
    """ X回以下の爆発で全滅するか """
    ans = 0
    for h in H:
        cnt = ((h - B * X) + (A - B) - 1) // (A - B)
        ans += max(0, cnt)
    return ans <= X

ng = 0
ok = 10 ** 18
while ok - ng > 1:
    mid = (ok + ng) // 2
    if check(mid):
        ok = mid
    else:
        ng = mid
print(ok)

# Optimized solution
N,A,B = list(map(int, input().split()))
H = [int(eval(input())) for i in range(N)]

def check(X):
    """ X回以下の爆発で全滅するか """
    ans = 0
    for h in H:
        cnt = ((h - B * X) + (A - B) - 1) // (A - B)
        ans += max(0, cnt)
    return ans <= X

def main():
    ng = 0
    ok = 10 ** 10
    while ok - ng > 1:
        mid = (ok + ng) // 2
        if check(mid):
            ok = mid
        else:
            ng = mid
    print(ok)

if __name__ == "__main__":
    main()