#include <iostream>
#include <queue>
#defien int long long
using namespace std;
constexpr int MAXN(1000007);
int n, a, b, sum;
struct node{ int a, b; }x[MAXN];
priority_queue <int> q;
inline void read(int &temp) { cin >> temp; }
inline int ceil(int x, int y) { return (x / y) + (x % y != 0); }
signed main() {
ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
read(n), read(a), read(b);
for (int i(1), t; i <= n; ++i) read(t), x[i].a = ceil((t - 1) % b + 1, a), x[i].b = ceil(t, b);
for (int i(1); i <= n; ++i) {
q.push(x[i].a + 1), sum += x[i].b - x[i].a - 1;
while (sum < -1) {
sum += q.top();
q.pop();
}
}
cout << (int)q.size() << endl;
return 0;
}