#include<bits/stdc++.h>
using namespace std;
int n,m,v,p,a[233333];
long long chk(int x)
{
	long long ret=1ll*(p-1)*m;
	for(int i=p;i<=n;i++)
	{
		ret+=min(m,a[x]+m-a[i]);
	}
//	cerr<<"chk "<<x<<'='<<ret<<endl;
	return ret;
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin>>n>>m>>v>>p;
	for(int i=1;i<=n;i++)
	{
		cin>>a[i];
	}
	sort(a+1,a+n+1,greater<int>());
	int l=p,r=n;
	while(l<r)
	{
		int mid=(l+r+1)/2;
		if(a[p]-a[mid]<=m&&chk(mid)>=1ll*m*v)l=mid;
		else r=mid-1;
	}
	cout<<l<<endl;
	return 0;
}