#include<bits/stdc++.h>
using namespace std;
template<typename T>inline T read(){
	T f=0,x=0;char c=getchar();
	while(!isdigit(c)) f=c=='-',c=getchar();
	while(isdigit(c)) x=x*10+c-48,c=getchar();
	return f?-x:x;
}
#define int long long
namespace run{
	const int N=2e5+9;
	int a[N],m,v,p,n,ans,sum[N];
	int main(){
		n=read<int>(),m=read<int>(),v=read<int>(),ans=p=read<int>();
		for(int i=1;i<=n;i++) a[i]=read<int>();
		sort(a+1,a+n+1);
		for(int i=1;i<=n;i++) sum[i]=sum[i-1]+a[i];
	//	for(int i=1;i<=n;i++) cout<<a[i]<<" ";cout<<endl;
		for(int i=1;i<=n-p;i++){
			if(m+a[i]<a[n-p+1]) continue;
			else{
				int tmp=(p-1+i)*m+((n-p+1-i)*(a[i]+m)-(sum[n-p+1]-sum[i]));
			//	cout<<tmp<<endl;
				if(tmp>=m*v) ans++;
			}
		}
		printf("%lld\n",ans);
		return 0;
	}
}
#undef int
int main(){
#ifdef my
	freopen(".in","r",stdin);
	freopen(".out","w",stdout);
#endif
	return run::main();
}
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
    long long N, M, V, P; cin >> N >> M >> V >> P;
    vector<long long> A(N);
    for(auto& t : A) cin >> t;
    sort(A.begin(), A.end());
    int L = -1, R = N-1;
    while(R-L > 1){
        int mid = (L+R)/2;
        long long thr = A[mid] + M;
        int gr = 0;
        long long add = M;
        for(int j=N-1;j>=0;j--){
            if(j == mid) continue;
            if(A[j] > thr){
                gr++;
                add += M;
            } else {
                if(gr+1 < P && A[j]+M > thr){
                    gr++;
                    add += M;
                } else {
                    add += min(M, thr-A[j]);
                }
            }
        }
        if(gr < P && add >= M*V) R = mid;
        else L = mid;
    }
    cout << N-R << endl;
}