import math

"""

def search(min_,max_,A,B,arr):

#    print(min_,max_)

    if min_==max_:

        return min_

    mid=(max_+min_)//2

    

    tmp=arr-mid*B

    

    if len(tmp)==0:

        return search(min_,mid,A,B,arr)

    

    tmp=map(lambda x:math.ceil(x/(A-B)),tmp)

    sum_=sum(list(tmp))

    if sum_<=mid:

        return search(min_,mid,A,B,arr)

    else:

        return search(mid+1,max_,A,B,arr)



    while True:

        if k<0:

            if mid==min_:

                return max_

            else:

                #failure

                return search(mid,max_,A,B,arr[:L])

        elif len(tmp)==0:

            #success

            return search(min_,mid,A,B,arr)

        x=-tmp[0]

        tmp=np.delete(tmp,0)

        k-=x//(A-B)+(x%(A-B)>0)

"""

        

    

N,A,B=list(map(int,input().split()))

arr=[]



for i in range(N):

    arr.append(int(eval(input())))



max_=max(arr)//B+1

min_=min(arr)//A



d=A-B



while min_!=max_:

    mid=(max_+min_)//2

    

    sum_=0

    for x in arr:

        sum_+=max(0,math.ceil((x-mid*B)/d))

        

    if sum_<=mid:

        max_=mid

    else:

        min_=mid+1



print(min_)
import math        

    

N,A,B=list(map(int,input().split()))

arr=[]



for i in range(N):

    arr.append(int(eval(input())))



max_=max(arr)//B+1

min_=min(arr)//A



d=A-B



while min_!=max_:

    mid=(max_+min_)//2

    

    sum_=0

    for x in arr:

        y=(x-mid*B)

        if y<=0:

            continue

        sum_+=math.ceil(y/d)

        

    if sum_<=mid:

        max_=mid

    else:

        min_=mid+1



print(min_)
import math

"""
def search(min_,max_,A,B,arr):
#    print(min_,max_)
    if min_==max_:
        return min_
    mid=(max_+min_)//2
    tmp=arr-mid*B
    if len(tmp)==0:
        return search(min_,mid,A,B,arr)
    tmp=map(lambda x:math.ceil(x/(A-B)),tmp)
    sum_=sum(list(tmp))
    if sum_<=mid:
        return search(min_,mid,A,B,arr)
    else:
        return search(mid+1,max_,A,B,arr)
    while True:
        if k<0:
            if mid==min_:
                return max_
            else:
                #failure
                return search(mid,max_,A,B,arr[:L])
        elif len(tmp)==0:
            #success
            return search(min_,mid,A,B,arr)
        x=-tmp[0]
        tmp=np.delete(tmp,0)
        k-=x//(A-B)+(x%(A-B)>0)
"""
N, A, B = list(map(int, input().split()))
arr = []
for i in range(N):
    arr.append(int(eval(input())))
max_ = max(arr) // B + 1
min_ = min(arr) // A
d = A - B
while min_ != max_:
    mid = (max_ + min_) // 2
    sum_ = 0
    for x in arr:
        sum_ += max(0, math.ceil((x - mid * B) / d))
    if sum_ <= mid:
        max_ = mid
    else:
        min_ = mid + 1
print(min_)

import math

N, A, B = list(map(int, input().split()))
arr = []
for i in range(N):
    arr.append(int(eval(input())))
max_ = max(arr) // B + 1
min_ = min(arr) // A
d = A - B
while min_ != max_:
    mid = (max_ + min_) // 2
    sum_ = 0
    for x in arr:
        y = x - mid * B
        if y <= 0:
            continue
        sum_ += math.ceil(y / d)
    if sum_ <= mid:
        max_ = mid
    else:
        min_ = mid + 1
print(min_)

-""" -def search(min_,max_,A,B,arr): -#    print(min_,max_) -    if min_==max_: -        return min_ -    mid=(max_+min_)//2 -    tmp=arr-mid*B -    if len(tmp)==0: -        return search(min_,mid,A,B,arr) -    tmp=map(lambda x:math.ceil(x/(A-B)),tmp) -    sum_=sum(list(tmp)) -    if sum_<=mid: -        return search(min_,mid,A,B,arr) -    else: -        return search(mid+1,max_,A,B,arr) -    while True: -        if k<0: -            if mid==min_: -                return max_ -            else: -                #failure -                return search(mid,max_,A,B,arr[:L]) -        elif len(tmp)==0: -            #success -            return search(min_,mid,A,B,arr) -        x=-tmp[0] -        tmp=np.delete(tmp,0) -        k-=x//(A-B)+(x%(A-B)>0) -""" -        sum_ += max(0, math.ceil((x - mid * B) / d)) +        y = x - mid * B +        if y <= 0: +            continue +        sum_ += math.ceil(y / d)