// Slower C++ solution:
#define ENABLE_LL

#include <iostream>

#include <cstdio>

#include <map>

#include <set>

#include <vector>

#include <algorithm>

#include <cstdlib>

#include <queue>

#include <cmath>

#include <cstring>

using namespace std;

 

#ifdef ENABLE_LL

#define int long long

#endif

 

#ifdef ENABLE_LL

#define I "%lld"

#define II "%lld%lld"

#define III "%lld%lld%lld"

#define IIII "%lld%lld%lld%lld"

#define IN "%lld\n"

#define IIN "%lld%lld\n"

#define IIIN "%lld%lld%lld\n"

#define IIIIN "%lld%lld%lld%lld\n"

#else

#define I "%d"

#define II "%d%d"

#define III "%d%d%d"

#define IIII "%d%d%d%d"

#define IN "%d\n"

#define IIN "%d%d\n"

#define IIIN "%d%d%d\n"

#define IIIIN "%d%d%d%d\n"

#endif

 

#ifdef __LOCALE__

#define see(a) std::cout << #a << "=" << a << std::endl

#define ses(a) std::cout << #a << "=" << a << " " 

#else

#define see(a) //std::cout << #a << "=" << a << std::endl

#define ses(a)

#endif

#define repe(a,b) for (int a=0;a<(int)b.size();a++)

#define rep(i,n) for (int i=0;i<n;i++)

#define repa(i,n) for (int i=1;i<=n;i++)

#define repi(i,a,b) for (int i=a;i<=b;i++) 

#define repb(i,a,b) for (int i=a;i>=b;i--)

typedef pair < int , int > pr;

typedef pair < pr  , int > prr;

#define L first

#define R second

template <class T> inline bool checkMin(T& a , T b) { return (a > b ? a=b,1 : 0); }

template <class T> inline bool checkMax(T& a , T b) { return (a < b ? a=b,1 : 0); }

class Scanner{ private: istream& ist;public: Scanner(istream& in):ist(in){} string next(){ string r; ist >> r; return r; } string nextLine(){ string r; getline(ist,r); return r; } int nextInt(){ int r; ist >> r; return r; } double nextDouble(){ double r; ist >> r; return r; }};

Scanner sc(cin);

 

const int N = 100005;

int a[N];

int n, m, v, p;

 

void init() {

    scanf(IIII,&n,&m,&v,&p);

    rep (i,n) scanf(I,&a[i]);

    sort(a, a+n); 

    rep (i,n) ses(a[i]); see("");

}

 

int b[N];

bool jury(int u) {

    rep (i,n) b[i] = a[i];

    b[u] += m;

    sort(b, b+n);

    int id = 0;

    rep (i,n) if (b[i] == a[u] + m) id = i;

    if (n-id > p) return 0;

    int sp = (p-1) * m;

    rep (i,n-p) {

        sp += min(m, b[id] - b[i]);

    }   

    if (sp >= m*(v-1)) return 1;

    return 0;

}

 

void solve() {

    int l=0, r=n-1;

    while (l<r) {

        int m = (l+r) / 2;

        ses(m);see(jury(m));

        if (jury(m)) {

            r = m;

        } else {

            l = m+1;

        }

    }

    printf(IN,n - l);

}

 

#ifdef ENABLE_LL

#undef int

#endif

int main(){

    init();

    solve();

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.377661144970198x):
#include <cstring>

#include <algorithm>

#include <cstdio>

#define int long long

#define ri register int

#define N 100005

using namespace std;

int n,m,v,p,t=0,ans,a[N]= {0};

template <typename T> inline void read(T &x) {

    T c=getchar(),f=0;

    for (; c<48||57<c; c=getchar()) if (c=='-') f=1;

    for (x=0; 48<=c&&c<=57; c=getchar()) x=(x<<3)+(x<<1)+(c^48);

    if (f) x=-x;

}

template <typename T> inline void print(T x) {

    if (x<0) x=-x,putchar('-');

    if (x>9) print(x/10);

    putchar(x%10+48);

}

signed main() {

	read(n),read(m),read(v),read(p),ans=p;

	for (ri i=1; i<=n; i++) read(a[i]);

	sort(a+1,a+1+n),reverse(a+1,a+1+n);

	for (ri i=p+1; i<=n; i++) {

		if (a[i]+m<a[p]) break;

		if (v<=(p-1)+(n-i+1)) ans++;

		else if ((v-p-n+i)*m<=t) ans++;

		else if (((v-p-n+i)*m-t-1)/(i-p)+1+a[p]<=a[i]+m) ans++;

		t+=a[p]-a[i];

	}

	print(ans),putchar('\n');

    return 0;

}