#include<bits/stdc++.h>
using namespace std;
const int N=1e5+5;
int n,M,V,P,a[N],i,l,r,m;
int main(){
	scanf("%d%d%d%d",&n,&M,&V,&P);
	for(i=1;i<=n;++i)scanf("%d",a+i);
	sort(a+1,a+n+1);
	l=1;r=n;
	for(;l<r;){
		m=l+r>>1;
		int ct=0,tot=V-1,res=0;
		for(i=n;i;--i)if(i!=m){
			if(++ct<P || a[i]<=a[m]){--tot;continue;}
			if(a[i]>a[m]+M)break;
			res-=a[m]+M-a[i];if(res<0)res+=M,--tot;
		}
		if(!i && 1ll*tot*M+res<=0)r=m;else l=m+1;
	}
	printf("%d\n",n-l+1);
	return 0;
}