var s:array[1..1000000000] of boolean;
s1:array[1..15] of boolean;
i,j,n,m,k,l,p,q,w,z:longint;


function put(x,q:longint):boolean;
begin
  p:=1;
    for j:=x to x+q do
    begin
        if not s[j] then
        s[j]:=s1[p];
        inc(p);
    end;
end;


function prov(x,q:longint):boolean;
begin
    p:=1;
     for j:=x to x+q do
     begin
          if (s[j]=s1[p])and(s[j]=true) then
          begin
              prov:=false;
              exit;
          end;
          inc(p);
     end;
     prov:=true;
end;


begin
    assign(input,'b.in');
    reset(input);
    assign(output,'b.out');
    rewrite(output);
    readln(n,m,k);
    readln(l);
    for i:=1 to l do
    begin
         read(q);
         s[q]:=true;
         s1[q]:=true;
    end;


    for i:=1 to n do
    begin
         for z:=i to i+q+1 do
         begin
          if prov(z,q) then
          begin
              put(z,q);
              w:=i;
              break;
          end;
         end;
    end;
    writeln(w+1+q);
    close(input);
    close(output);
end.
