#include<bits/stdc++.h>
using namespace std;
# define C continue;
# define R return
# define D double
# define I insert
# define ll long long
# define ld long double
# define ull unsigned long long
# define ui unsigned int
# define pb push_back
# define pf push_front
# define vi vector < int >
# define vc vector < char >
# define vs vector < string >
# define vb vector < bool >
# define vd vector < D >
# define vll vector < ll >
# define vull vector < ull >
# define vld vector < ld >
# define PQ priority_queue
# define vvi vector < vector < int > >
# define vvb vector < vector < bool > >
# define vvc vector < vector < char > >
# define vvll vector < vector < ll > >
# define vvd vector < vector < D > >
# define vvld vector < vector < ld > >
# define all(v) (v).begin() , (v).end()
# define allrev(v) (v).rbegin() , (v).rend()
# define allcomp(v) v.begin() , v.end() , comp
# define allrevcomp(v) v.rbegin() , v.rend() , comp
# define pii pair < int , int >
# define pll pair < ll , ll >
# define pld pair < ld , ld >
# define pDD pair < D , D >
# define vpld vector < pld >
# define vpii vector < pii >
# define vpll vector < pll >
# define vpDD vector < pDD >
# define vvpii vector < vector < pii > >
# define F first
# define S second
# define mp make_pair
# define dist(a,b,p,q) sqrt((p-a)*(p-a) + (q-b)*(q-b))
# define pp(n) printf("%.10Lf",n);
# define line cout<<"\n";
# define fast ios_base::sync_with_stdio(false) ; cin.tie(0) ; cout.tie(0);
string vow = "aeiou";
int month[] = {-1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
const int dxhorse[] = {-2, -2, -1, -1, 1, 1, 2, 2};
const int dyhorse[] = {1, -1, 2, -2, 2, -2, 1, -1};
const int dx[] = { -1 , 0 , 0 , 1 } ;
const int dy[] = { 0 , -1 , 1 , 0 } ;
const ld pie = 3.1415926535897932384626 ;
const ll mod = 1e9 + 7 ;
/// Tip : If a and b are positive integers ; we may say - ceil (a/b) = 1 + floor ( (a-1)/b ) .
void solve ( int test_case )
{
int n , a , b , k ;
cin >> n >> a >> b >> k ;
vi v ( n ) ;
for ( int i=0 ; i < n ; i ++ )
{
int temp ;
cin >> temp ;
int t = temp / ( a + b ) ;
t -- ;
if ( t < 0 ) t = 0 ;
temp = temp - (a+b) * t ;
v[i] = temp ;
}
for ( int i=0 ; i < n ; i ++ )
{
int &temp = v[i] ;
int mv = 1 ;
for ( ; ; mv ^= 1 )
{
if ( mv == 1 )
{
temp -= a ;
if ( temp <= 0 )
{
v[i] = -1 ;
break ;
}
}
else
{
if ( temp - b > 0 )
{
temp -= b ;
C ;
}
else break ;
}
}
}
sort ( all ( v ) ) ;
int i=0 ;
while ( i < n && v[i] == -1 ) i ++ ;
for ( ; i < n ; i ++ )
{
int val = v[i] ;
int mv = 1 + (val - 1) / a ;
if ( mv > k )
break ;
k -= mv ;
v[i] = -1 ;
}
int ans = 0 ;
for ( auto i : v )
{
if ( i <= 0 )
ans ++ ;
}
cout << ans ; line ;
}
int main()
{fast
int t = 1;
// cin >> t;
for ( int i=0 ; i < t ; i++ ) solve(i);
return 0;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCiMgZGVmaW5lIEMgY29udGludWU7CiMgZGVmaW5lIFIgcmV0dXJuCgojIGRlZmluZSBEIGRvdWJsZQojIGRlZmluZSBJIGluc2VydAojIGRlZmluZSBsbCBsb25nIGxvbmcKIyBkZWZpbmUgbGQgbG9uZyBkb3VibGUKCiMgZGVmaW5lIHVsbCB1bnNpZ25lZCBsb25nIGxvbmcKIyBkZWZpbmUgdWkgdW5zaWduZWQgaW50CgojIGRlZmluZSBwYiBwdXNoX2JhY2sKIyBkZWZpbmUgcGYgcHVzaF9mcm9udAoKIyBkZWZpbmUgdmkgdmVjdG9yIDwgaW50ID4KIyBkZWZpbmUgdmMgdmVjdG9yIDwgY2hhciA+CiMgZGVmaW5lIHZzIHZlY3RvciA8IHN0cmluZyA+CiMgZGVmaW5lIHZiIHZlY3RvciA8IGJvb2wgPgojIGRlZmluZSB2ZCB2ZWN0b3IgPCBEID4KIyBkZWZpbmUgdmxsIHZlY3RvciA8IGxsID4KIyBkZWZpbmUgdnVsbCB2ZWN0b3IgPCB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