#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define MOD 1000000007
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define INF 100000000000000 //INF - 1e14
#define vi vector<ll>
#define pb push_back
#define mpl map<ll,ll>
#define ff first
#define ss second
#define pll pair<ll,ll>
#define vpll vector<pair<ll,ll> >
#define fer(i, a, n) for( ll i = a; i <= n; i++)
#define fdr(i, a, n) for( ll i = a; i >= n; i--)
#define invec(n,v) vi v(n); fer(i,0,n-1) cin >> v[i]
#define insvec(n,v) rin(n); vi v(n); fer(i,0,n-1) cin >> v[i]
#define MK2DV(v,row,col,val) vector<vector<ll> > v(row, vector<ll>(col,val))
#define matrix vector<vector<ll> >
#define printv(v,i,j) for(ll it =i; it <= j; it++) cout << v[it] << ' '; cout << '\n';
#define printpartition cout << "-------------------------------------------------------------" << endl;
#define printmat(mat,row,col) fer(i,0,row-1)fer(j,0,col-1)cout << mat[i][j] << " \n"[j == col-1];
#define ordered_set tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update>
void __print(int x) {cout << x;}
void __print(long x) {cout << x;}
void __print(long long x) {cout << x;}
void __print(unsigned x) {cout << x;}
void __print(unsigned long x) {cout << x;}
void __print(unsigned long long x) {cout << x;}
void __print(float x) {cout << x;}
void __print(double x) {cout << x;}
void __print(long double x) {cout << x;}
void __print(char x) {cout << '\'' << x << '\'';}
void __print(const char *x) {cout << '\"' << x << '\"';}
void __print(const string &x) {cout << '\"' << x << '\"';}
void __print(bool x) {cout << (x ? "true" : "false");}
template<typename T, typename V>
void __print(const pair<T, V> &x) {cout << '{'; __print(x.first); cout << ','; __print(x.second); cout << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cout << '{'; for (auto &i : x) cout << (f++ ? "," : ""), __print(i); cout << "}";}
void _print() {cout << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cout << ", "; _print(v...);}
template <typename T> inline void inp(T &any) {cin >> any;} template <typename T, typename... U>inline void inp(T &a, U &...b) {cin >> a; inp(b...);}
#define rin(args...) ll args; inp(args);
#ifndef ONLINE_JUDGE
#define debug(x...) cout << "[" << #x << "] = ["; _print(x)
#define matdeb(mat,row,col) cout << #mat << "::" << endl; printmat(mat,row,col); printpartition;
#define debugv(v,n) cout << #v << ":" << endl; printv(v,0,n-1); printpartition;
#else
#define debug(x...)
#define matdeb(mat,row,col)
#define debugv(v,n)
#endif
ll fast_pow(ll base, ll exp, ll M = MOD) { base = base % M; ll result = 1; while (exp > 0) { if (exp % 2 == 1) result = (result * base) % M; base = (base * base) % M; exp = exp / 2; } return result; }
ll modInverse(ll A, ll M = MOD) { return fast_pow(A, M - 2, M); } // only when M is prime
ll lcm(ll x, ll y) { return x / __gcd(x, y) * y;}
void coordinatecompress(vector<ll> &arr) { ll n = arr.size(); vector<pair<ll, ll> > temparr(n); fer(i, 0, n - 1) temparr[i] = {arr[i], i}; sort(temparr.begin(), temparr.end()); arr[temparr[0].second] = 0; fer(i, 1, n - 1) arr[temparr[i].second] = arr[temparr[i - 1].second] + (temparr[i - 1].first != temparr[i].first); }
string yes = "Yes", no = "No";
// void dfs(ll s, ll p) {
// 	for (auto nbr : adj[s]) {
// 		if (nbr != p) {
// 			dfs(nbr, s);
// 		}
// 	}
// }
const int N = 2e5;
ll v[N];
ll n, m, c, p;
bool check(ll index) {
	ll d = c;
	ll n1 = upper_bound(v, v + n, v[index]) - v;
	// debug(n1);
	if (n - n1 < p) { // already in top P
		return true;
	}
	else {
		// debug("else");
		ll n2 = upper_bound(v, v + n, v[index] + m) - v;
		// debug(n2);
		if (n - n2 >= p) {
			return false;
		}
		ll s = 0;
		s += m * (p - 1 + n1);
		for (int j = index + 1; j <= n - p; j++) {
			s += min(m, v[index] + m - v[j]);
		}
		// debug(s);
		if (s >= m * c) {
			return true;
		}
		else {
			return false;
		}
		// if(v[n-p] <= v[index])
		// 	return true;
		// else

		// debug(d);
		d -= n1 + n - n2;
		// debug(d);
		// d are left all strictly above v[i]
		// take from n1 to n2-1
		if (d <= 0) {
			// debug("return t");
			return true;
		}
		// debug(n1, n2 - 1, d);
		// from n1 to n2-1

	}
	return true;
}
ll binarysearch(ll s, ll e)
{
	ll ans = -1; // INVALID ANS IS -1
	while (s <= e) {
		ll mid = s + (e - s) / 2;
		if (check(mid)) {
			ans = mid;
			e = mid - 1;
		}
		else
			s = mid + 1;
	}
	return ans;
}
int main() {
	ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

	cin >> n >> m >> c >> p;
	for (int i = 0; i < n; i++)
		cin >> v[i];
	sort(v, v + n);
	cout << n - binarysearch(0, n - 1);
	return 0;
}


Measured memory_bytes: 4432