program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  n,m,k,l,minl,maxl,t1,t2,t3: integer;
  sum: int64;
  a: array[1..10] of integer;
  F: textfile;

begin
  AssignFile(F,'B.in');
  Reset(F);
  Readln(F,n,m,k);
  Readln(F,l);
  for t1:=1 to l do
  begin
    read(F,a[t1]);
  end;
  CloseFile(F);

  minl:=100500;
  for t1:=1 to l do if a[t1]<minl then minl:=a[t1];
  maxl:=0;
  for t1:=1 to l do if a[t1]>maxl then maxl:=a[t1];
  sum:=(minl-1)+l*n+(k-maxl);
  if (m<k) and ((minl-1+l*m-minl+1)<k) then
    sum:=sum+(k-(minl-1+l*m-minl+1))*((n div l)-1);


  AssignFile(F,'B.out');
  rewrite(F);
  writeln(F,sum);
  closefile(F);
end.
 