var
l,n,m,i,j,mid,max:longint;
d:array[0..50010]of longint;
function check(a:longint):boolean;
var
i,j,now:longint;
begin
j:=m;
now:=0;
for i:=1 to n+1 do begin
if d[i]-d[now]<a then begin
if j>0 then j:=j-1
else exit(false);
end
else now:=i;
end;
exit(true);
end;
procedure qsort(l,r:longint);
var
i,j,m:longint;
begin
m:=d[(l+r)div 2];
i:=l;
j:=r;
repeat
while d[i]<m do inc(i);
while d[j]>m do dec(j);
if i<=j then begin
d[n+2]:=d[i];
d[i]:=d[j];
d[j]:=d[n+2];
inc(i);
dec(j);
end;
until i>j;
if i<r then qsort(i,r);
if j>l then qsort(l,j);
end;
begin
assign(input,'2015stone.in');
reset(input);
assign(output,'2015stone.out');
rewrite(output);
readln(l,n,m);
d[0]:=0;
d[n+1]:=l;
max:=0;
for i:=1 to n do
read(d[i]);
qsort(1,n);
i:=0;
j:=l;
repeat
mid:=(i+j)div 2;
if check(mid)=true then begin
max:=mid;
i:=mid;
end
else j:=mid;
until i=j-1;
if check(j)=true then writeln(j)
else writeln(max);
close(input);
close(output);
end.