#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
typedef long long ll;

int main(){
	ll n,m,v,p;
	cin >> n >> m >> v >> p;
	vector<ll> a(n);
	rep(i,n) cin >> a[i];
	sort(a.rbegin(),a.rend());
	ll ans(p);
	ll line = a[p-1];
	ll cum(0);
	for(ll i(p);i<n;++i){
		ll ok_n = n - i + p - 1;
		ll over = v - ok_n;
		if(over <= 0){
			if(a[i] + m >= line)ans++;
		}else{
			if(a[i] + m >= line){
				ll cap = cum + (a[i] + m - line) * (i - p + 1);
				// if ((a[i - over] < (a[i] + m + 1)) && (cap > over * m))ans++;
				if (cap >= over * m)ans++;
			}
		}
		cum += line - a[i];
	}
	cout << ans << endl;
	return 0;
}