PROGRAM second;
type mass=array of integer;
var nopair,pair,number:mass;
    i,num,nonum,count,count2,length:integer;
function check(mass1:mass;N,l:integer):boolean;
  var i:integer;
  begin   
   for i:=0 to N-1 do
    if l=mass1[i] then 
      begin
       check:=true;
       break;
      end;
   if l<>mass1[i] then check:=false;
  end; 
begin    
read(num,nonum);
setlength(nopair,nonum);
setlength(pair,num);
for count:=0 to nonum-1 do read(nopair[count]);
for count:=0 to num-1 do pair[count]:=count+1;
 length:=(num*(num+1)) div 2;
 setlength(number,length);
 i:=0;
for count:=0 to num-1 do
  for count2:=count to num-1 do
    if (check(nopair,nonum,count+1)=true) or(check(nopair,nonum,count2+1)=true) then
    begin
      length:=length-1;
      setlength(number,length);
      end
    else
     begin
     if check(number,length,count+count2+2)=true then 
     begin
      length:=length-1;
      end
     else
     begin
     number[i]:=count+count2+2;
     i:=i+1;
     end;
     end;
write(I);     
end.
 
 
