#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
using ll = long long;

void ins() {}
template<class T,class... Rest>void ins(T& v,Rest&... rest){cin>>v;ins(rest...);}
#define _overload3(_1,_2,_3,name,...) name
#define _rep2(i,n) for(int i=0,_i=(n);i<_i;++i)
#define _rep3(i,a,b) for(int i=(a),_i=(b),_ii=(b)>(a)?1:-1;abs(_i-i)>0;i+=_ii)
#define rep(...) _overload3(__VA_ARGS__,_rep3,_rep2)(__VA_ARGS__)
#define all(f,c,...) (([&](decltype((c)) cccc) { return (f)(begin(cccc), end(cccc), ## __VA_ARGS__); })(c))

signed main() {
  ll N, M, V, P;
  ins(N, M, V, P);

  vector<ll> A(N);
  rep(i, N)
    cin >> A[i];
  all(sort, A); all(reverse, A);

  int ok = -1, ng = N;
  auto f = [&](int mid) {
    if (mid < P) return true;
    if (A[P-1] > A[mid]+M) return false;

    ll tmp = 1LL * ((N-mid)+P-1) * M;
    rep(i, P-1, mid)
      tmp += min(1LL*M, max(0LL, A[mid]+M-A[i]));
    return tmp >= M*V;
  };
  while (abs(ok - ng) > 1) {
    int mid = ok + (ng-ok) / 2;
    (f(mid) ? ok : ng) = mid;
  }
  cout << ok+1 << endl;
  return 0;
}

#include<iostream>
#include<iomanip>
#include<cmath>
#include<string>
#include<cstring>
#include<vector>
#include<list>
#include<algorithm>
#include<map>
#include<set>
#include<queue>
#include<stack>
using namespace std;
typedef long long ll;
#define fi first
#define se second
#define mp make_pair
#define mt make_tuple
#define pqueue priority_queue
const int inf=1e9+7;
const ll mod=1e9+7;
const ll mod1=998244353;
const ll big=1e18;
const double PI=2*asin(1);

int main() {
  ll N, M, V, P;
  cin>>N>>M>>V>>P;
  vector<ll> A(N);
  for(int i=0;i<N;++i) cin>>A[i];
  sort(A.begin(), A.end());
  ll l=0, r=N-1, m;
  ll score;
  ll vote;
  vector<ll> tmparr(N);
  ll zero = 0;
  int index;
  while(l<r) {
    m = (l+r)/2;
    score = M+A[m];
    vote = M*(V-1);
    for(int i=0;i<N;++i) {
      if(i!=m) vote -= min(M, max(zero, score-A[i]));
      tmparr[i] = max(score, A[i]);
    }
    for(int i=N-1;i>=0;--i) {
      if(vote>0) {
        vote -= M-max(score-A[i], zero);
        tmparr[i] = score+1;
      }
    }
    index = upper_bound(tmparr.begin(), tmparr.end(), score)-tmparr.begin();
    if(N-index<P) r = m;
    else l=m+1;
  }
  cout<<N-l<<endl;
}

