def main():

    N, A, B = (int(i) for i in input().split())

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



    def is_ok(x):

        y = 0  # 中心爆破必要回数

        for i, h in enumerate(H):

            if h - x*B <= 0:

                continue

            le = 0

            ri = 10**9 + 1

            while ri - le > 1:

                mid = le + ((ri - le) // 2)

                if h - B*(max(x - mid, 0)) - A*mid <= 0:

                    ri = mid

                else:

                    le = mid

            y += ri

        if y <= x:  # 魔物を消し去るのが可能

            return True

        else:

            return False



    def binary_search_meguru():

        left = -1

        right = 10**9 + 1

        while right - left > 1:

            mid = left + ((right - left) // 2)

            if is_ok(mid):

                right = mid

            else:

                left = mid

        return right



    print((binary_search_meguru()))





if __name__ == '__main__':

    main()

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()

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

    def is_ok(x):
        y = 0  # 中心爆破必要回数
        for i, h in enumerate(H):
            if h - x * B <= 0:
                continue
            le = 0
            ri = 10**9 + 1
            while ri - le > 1:
                mid = le + ((ri - le) // 2)
                if h - B * (max(x - mid, 0)) - A * mid <= 0:
                    ri = mid
                else:
                    le = mid
            y += ri
        if y <= x:  # 魔物を消し去るのが可能
            return True
        else:
            return False

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

    print((binary_search_meguru()))


if __name__ == "__main__":
    main()

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()

-    def is_ok(x): -        y = 0  # 中心爆破必要回数 -        for i, h in enumerate(H): -            if h - x * B <= 0: -                continue -            le = 0 -            ri = 10**9 + 1 -            while ri - le > 1: -                mid = le + ((ri - le) // 2) -                if h - B * (max(x - mid, 0)) - A * mid <= 0: -                    ri = mid -                else: -                    le = mid -            y += ri -        if y <= x:  # 魔物を消し去るのが可能 +    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: -    def binary_search_meguru(): -        left = -1 -        right = 10**9 + 1 -        while right - left > 1: -            mid = left + ((right - left) // 2) -            if is_ok(mid): -                right = mid +    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 -                left = mid -        return right +                ng = mid +        return ok -    print((binary_search_meguru())) +    print((binary_search_meguru(H)))