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 = list(map(int, input().split()))

    h_list = list(sorted([int(eval(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()

from collections import defaultdict, Counter

from itertools import product, groupby, count, permutations, combinations

from math import pi, sqrt

from collections import deque

from bisect import bisect, bisect_left, bisect_right

from string import ascii_lowercase

from functools import lru_cache

import sys

sys.setrecursionlimit(10000)

INF = float("inf")

YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"

dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]

dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]





def inside(y, x, H, W):

    return 0 <= y < H and 0 <= x < W





def ceil(a, b):

    return (a + b - 1) // b





def ok(n, A, B, H):

    num = 0

    for h in H:

        r = h - n * B

        if r > 0:

            num += ceil(r, (A - B))

    return num <= n





def main():

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

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



    low, high = 0, 10 ** 10

    ans = 0

    while high - low > 1:

        middle = (low + high) // 2

        if ok(middle, A, B, H):

            ans = middle

            high = middle

        else:

            low = middle



    print(ans)





if __name__ == '__main__':

    main()

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 = list(map(int, input().split()))
    h_list = list(sorted([int(eval(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()

from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys

sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def ok(n, A, B, H):
    num = 0
    for h in H:
        r = h - n * B
        if r > 0:
            num += ceil(r, (A - B))
    return num <= n


def main():
    N, A, B = list(map(int, input().split()))
    H = sorted([int(eval(input())) for _ in range(N)])
    low, high = 0, 10**10
    ans = 0
    while high - low > 1:
        middle = (low + high) // 2
        if ok(middle, A, B, H):
            ans = middle
            high = middle
        else:
            low = middle
    print(ans)


if __name__ == "__main__":
    main()

-from collections import defaultdict -from math import ceil +from collections import defaultdict, Counter +from itertools import product, groupby, count, permutations, combinations +from math import pi, sqrt +from collections import deque +from bisect import bisect, bisect_left, bisect_right +from string import ascii_lowercase +from functools import lru_cache +import sys + +sys.setrecursionlimit(10000) +INF = float("inf") +YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no" +dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0] +dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1] -def can_kill(total, A, B, h_list): -    add = A - B +def inside(y, x, H, W): +    return 0 <= y < H and 0 <= x < W + + +def ceil(a, b): +    return (a + b - 1) // b + + +def ok(n, A, B, H): -    for h in h_list: -        h -= B * total -        num += ceil(h / add) -        if num > total: -            return False -    return True +    for h in H: +        r = h - n * B +        if r > 0: +            num += ceil(r, (A - B)) +    return num <= n -    h_list = list(sorted([int(eval(input())) for _ in range(N)], reverse=True)) -    left, right = -1, 10**10 +    H = sorted([int(eval(input())) for _ in range(N)]) +    low, high = 0, 10**10 -    while right - left > 1: -        m = (left + right) // 2 -        if can_kill(m, A, B, h_list): -            ans = m -            right = m +    while high - low > 1: +        middle = (low + high) // 2 +        if ok(middle, A, B, H): +            ans = middle +            high = middle -            left = m +            low = middle