//nongdanjohn - THPTNguyenQuangDieu - nhatkynghiencuu.blogspot.com
const maxN = 50001;
var n,m,l,ans: longint;
    d: integer;
    s: array[1..maxN] of longint;

procedure enter;
var i: longint;
begin
    assign(input,''); reset(input);
    readln(n,m,d,l);
    for i:=1 to n do readln(s[i]);
end;

procedure sort(l,h: longint);
var i,j,t,k: longint;
begin
    i:=l; j:=h; k:=s[(i+j) div 2];
    repeat
      while S[i]<k do inc(i);
      while s[j]>k do dec(j);
      if i<=j then
        begin
          t:=s[i]; s[i]:=s[j]; s[j]:=t;
          dec(j); inc(i);
        end;
    until i>j;
    if l<j then sort(l,j);
    if i<h then sort(i,h);
end;

procedure solve;
var i,count,j: longint;
begin
    ans:=0; count:=0; j:=0;
    for i:=1 to n do
      if S[i]-D*j >= L then
        begin
          inc(ans);
          inc(count);
          if count=m then
            begin
              count:=0;
              inc(j);
            end;
        end;
end;

begin
    enter;
    sort(1,n);
    solve;
    writeln(ans)
end.