#include <bits/stdc++.h>
using namespace std;
#define oo 1000000010
#define mod 1000000007
const int N = 100010;
int n , m , arr[N] , v , p;

bool check(int mid){
	int val = arr[mid] + m;
	if(arr[n - p] > val)
		return false;
	long long all = 0;
	for(int i = 0 ;i < n - p + 1;i++){
		all += min(m , max(0 , val - arr[i]));
	}
	all /= m;
	if(all >= v - (p - 1))
		return true;
	return false;
}

int main(){
	scanf("%d%d%d%d",&n,&m,&v,&p);
	for(int i = 0 ;i < n;i++){
		scanf("%d",&arr[i]);
	}
	sort(arr,arr+n);
	int low = 0 , high = n - 1 , res = n , mid;
	while(high >= low){
		mid = (low + high) / 2;
		if(check(mid))
			res = mid , high = mid - 1;
		else
			low = mid + 1;
	}
	cout << n - res << endl;
	return 0;
}

#include <stdio.h>
#include <stdlib.h>

unsigned gaps[] = {1,8,23,77,281,1073,4193,16577,65921,262913,1050113};
// generated from pow(4,i)+3*pow(2,i-1)+1 (prefixed with 1)

unsigned insertion_sort(unsigned a[], unsigned n, unsigned gap){
  unsigned i,count = 0;
  for(i = gap; i < n; i++){
    unsigned v = a[i];
    int j = i - gap;
    while(j >= 0 && a[j] > v){
      a[j+gap] = a[j];
      j -= gap;
      count++;
    }
    a[j+gap] = v;
  }
  return count;
}

void shell_sort(unsigned a[], unsigned n){
  int i;
  unsigned gap_num = 0;
  while(gaps[++gap_num] < n);
  gap_num--;

  unsigned count = 0;
  for(i = gap_num; i >= 0; i--) count += insertion_sort(a,n,gaps[i]);

  printf("%u\n",(gap_num+1));

  for(i = gap_num; i; i--) printf("%u ",gaps[i]);
  printf("%u\n",gaps[0]);

  printf("%u\n",count);
}

int main(){
  unsigned n,i;
  scanf("%u",&n);
  unsigned* a = (unsigned*)malloc(sizeof(unsigned)*n);
  for(i = 0; i < n; i++) scanf("%u",&a[i]);
  shell_sort(a,n);
  for(i = 0; i < n; i++) printf("%u\n",a[i]);
  free(a);
  return 0;
}