#include <bits/stdc++.h>
using namespace std;
/*
PROBLEM (simple)
----------------
There are n tasks, need[i] work each.
In each round:
- choose ONE task to focus -> gains x work
- all other unfinished tasks gain y work (y < x)
Tasks disappear once finished.
Goal: minimum number of rounds to finish all tasks.
Key trick
---------
Binary search the answer R (round count).
Check if R rounds is enough:
- Every task automatically gets baseline R*y work (because even when not chosen, it gets y).
- If a task still needs more, the only way is choosing it in some rounds.
Each time we choose it, it gains EXTRA (x-y) beyond baseline.
For task i:
rem = max(0, need[i] - R*y)
boostsNeeded = ceil(rem / (x-y))
Total boosts across all tasks must be <= R (we only have R rounds to boost tasks).
*/
static bool canFinish(long long R, long long x, long long y, const vector<long long>& need) {
long long extra = x - y; // extra gained when focused
__int128 totalBoosts = 0; // use big type to avoid overflow
for (long long w : need) {
__int128 base = (__int128)R * y; // baseline progress after R rounds
if (base >= w) continue; // already finished without boosting
__int128 rem = w - base;
// ceil(rem / extra)
__int128 boosts = (rem + extra - 1) / extra;
totalBoosts += boosts;
// early stop: if we already need more boosts than rounds exist, not possible
if (totalBoosts > R) return false;
}
return totalBoosts <= R;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
long long x, y;
cin >> n >> x >> y;
vector<long long> need(n);
for (int i = 0; i < n; i++) cin >> need[i];
// Find a high bound for binary search by doubling
long long lo = 0, hi = 1;
while (!canFinish(hi, x, y, need)) hi *= 2;
// Binary search for smallest R that works
while (lo + 1 < hi) {
long long mid = lo + (hi - lo) / 2;
if (canFinish(mid, x, y, need)) hi = mid;
else lo = mid;
}
cout << hi << "\n";
return 0;
}