//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.
Ly9ub25nZGFuam9obiAtIFRIUFROZ3V5ZW5RdWFuZ0RpZXUgLSBuaGF0a3luZ2hpZW5jdXUuYmxvZ3Nwb3QuY29tCmNvbnN0IG1heE4gPSA1MDAwMTsKdmFyIG4sbSxsLGFuczogbG9uZ2ludDsKICAgIGQ6IGludGVnZXI7CiAgICBzOiBhcnJheVsxLi5tYXhOXSBvZiBsb25naW50OwoKcHJvY2VkdXJlIGVudGVyOwp2YXIgaTogbG9uZ2ludDsKYmVnaW4KICAgIGFzc2lnbihpbnB1dCwnJyk7IHJlc2V0KGlucHV0KTsKICAgIHJlYWRsbihuLG0sZCxsKTsKICAgIGZvciBpOj0xIHRvIG4gZG8gcmVhZGxuKHNbaV0pOwplbmQ7Cgpwcm9jZWR1cmUgc29ydChsLGg6IGxvbmdpbnQpOwp2YXIgaSxqLHQsazogbG9uZ2ludDsKYmVnaW4KICAgIGk6PWw7IGo6PWg7IGs6PXNbKGkraikgZGl2IDJdOwogICAgcmVwZWF0CiAgICAgIHdoaWxlIFNbaV08ayBkbyBpbmMoaSk7CiAgICAgIHdoaWxl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