import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop;

void main() {
    auto s = readln.split.map!(to!int).array;
    auto N = s[0];
    auto A = s[1].to!BigInt;
    auto B = s[2].to!BigInt;
    auto H = N.iota.map!(_ => readln.chomp.to!BigInt).array;

    BigInt hi = 10L ^^ 15;
    BigInt lo = 0;

    while (hi - lo > 1) {
        auto mid = (hi + lo) / 2;
        BigInt tmp = 0;
        foreach (i; 0..N) {
            if ((H[i] - mid * B) % (A - B) == 0)
                tmp += (H[i] - mid * B) / (A - B);
            else
                tmp += (H[i] - mid * B) / (A - B) + 1;

        }
        if (tmp <= mid)
            hi = mid;
        else
            lo = mid;
    }

    hi.writeln;
}
