import math

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

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

l = 0

r = math.ceil(max(H))

ans = 0

d = A-B

while(1):

    if l+1 == r:

        ans = r

        break

    else:

        m = (l+r) // 2

        count = 0

        for i in range(N):

            if (H[i] - m*B) > 0:

                count += math.ceil((H[i]-m*B) / d)

        if count <= m:

            r = m

        else:

            l = m

print(ans)



def main():

    import math

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

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

    d = A - B



    l = 1

    r = max(h)

    while(l+1 < r):

        m = (l+r)//2

        t = m*B

        count = 0

        for x in h:

            if x > t:

                count += math.ceil((x-t)/d)

        if count <= m:

            r = m

        else:

            l = m



    print(r)





main()

import math

N, A, B = list(map(int, input().split()))
H = [int(eval(input())) for i in range(N)]
l = 0
r = math.ceil(max(H))
ans = 0
d = A - B
while 1:
    if l + 1 == r:
        ans = r
        break
    else:
        m = (l + r) // 2
        count = 0
        for i in range(N):
            if (H[i] - m * B) > 0:
                count += math.ceil((H[i] - m * B) / d)
        if count <= m:
            r = m
        else:
            l = m
print(ans)

def main():
    import math

    N, A, B = list(map(int, input().split()))
    h = [int(eval(input())) for i in range(N)]
    d = A - B
    l = 1
    r = max(h)
    while l + 1 < r:
        m = (l + r) // 2
        t = m * B
        count = 0
        for x in h:
            if x > t:
                count += math.ceil((x - t) / d)
        if count <= m:
            r = m
        else:
            l = m
    print(r)


main()

-import math +def main(): +    import math -N, A, B = list(map(int, input().split())) -H = [int(eval(input())) for i in range(N)] -l = 0 -r = math.ceil(max(H)) -ans = 0 -d = A - B -while 1: -    if l + 1 == r: -        ans = r -        break -    else: +    N, A, B = list(map(int, input().split())) +    h = [int(eval(input())) for i in range(N)] +    d = A - B +    l = 1 +    r = max(h) +    while l + 1 < r: +        t = m * B -        for i in range(N): -            if (H[i] - m * B) > 0: -                count += math.ceil((H[i] - m * B) / d) +        for x in h: +            if x > t: +                count += math.ceil((x - t) / d) -print(ans) +    print(r) + + +main()