var z,c,t,x,m,b:extended;
i,j,d,k,n,l:integer;
   a:array[1..10] of integer;
begin
   assign(input,'B.in');
   reset(input);
   assign(output,'B.out');
   rewrite(output);

   read(n);
   read(m);
   read(k);
   read(l);

   fillchar(a,sizeof(a),0);

   if l>0 then begin
        for i:=1 to l do begin
           read(d);
           a[d]:=d;
        end;
        for i:=k downto 1 do
           if a[i]<>0 then begin
              z:=a[i];
              for j:=a[i]-1 downto 1 do
                  x:=z-a[j];
              x:=x-1;
           end;

        if x<=0 then begin
           x:=0;
           i:=1;
           repeat begin
              x:=x+1;
              i:=i+1;
              end
           until a[i-1]=1;
           x:=k-z+x;
           b:=x*(n div round(m));
           x:=n mod round(m);
              t:=(x*k-b)/2;
        end; end;
   if x>0 then begin
      c:=0;
      i:=1;
      repeat begin
         c:=x+1;
         i:=i+1;
      end until a[i-1]=1;
      x:=k-z+x+c;
      b:=x*(n div round(m));
      x:=n mod round(m);
      t:=(x*k-b)/2;
   end;
   if l<0 then t:=(n div k)*k;
   write(t:0:0);
   close(output);
end.
