program cogs111;
var
a:array[0..110]of longint;
f,b:array[1..10000] of longint;
s,t,m,l,i,j,p:longint;
function min(a,b:longint):longint;
begin
if a<b then exit(a) else exit(b);
end;
begin
assign(input,'river.in');reset(input);
assign(output,'river.out');rewrite(output);
readln(l);
readln(s,t,m);
for i:=1 to m do read(a[i]);
filldword(f,sizeof(f)div 4,maxlongint);
if s=t then begin
for i:=1 to m do
if a[i] mod t=0 then inc(j);
writeln(j); halt;end;
for i:=1 to m do
for j:=i+1 to m do
if a[i]>a[j] then begin
p:=a[i];a[i]:=a[j];a[j]:=p;
end;
for i:=1 to m do begin
p:=a[i]-a[i-1]-t;
if p>0 then
for j:=i to m do dec(a[j],p); end;
l:=min(a[m]+t,l);
for i:=1 to m do b[a[i]]:=1;
for i:=s to l do
begin
if i>t then
for j:=i-t to i-s do
f[i]:=min(f[i],f[j])
else
for j:=1 to i-s do
f[i]:=min(f[i],f[j]);
if f[i]=maxlongint then f[i]:=0;
f[i]:=f[i]+b[i];
end;
writeln(f[l]);
close(input);close(output);
end.