#include<bits/stdc++.h>
using namespace std;
int n,m,v,p,a[111111],l,r,mid;
long long lst;
bool check()
{
	if (mid<=p) return 1;
	if (a[p]>a[mid]+m) return 0;
	if (p-1+n-mid+1>=v) return 1;
	lst=1ll*m*v-1ll*(p-1+n-mid+1)*m;
	for (int i=p;i<mid;i++)
	{
		lst-=(a[mid]+m-a[i]);
	}
	if (lst<=0) return 1;
	return 0;
}
int main()
{
	scanf("%d%d%d%d",&n,&m,&v,&p);
	for (int i=1;i<=n;i++) scanf("%d",&a[i]);
	sort(a+1,a+n+1);
	reverse(a+1,a+n+1);
	l=1;r=n;
	while(l<=r)
	{
		mid=(l+r)>>1;
		if (check()) l=mid+1;
		else r=mid-1;
	}
	printf("%d\n",r);
	return 0;
}