Program Coop;
Var N,K,i,a,j:int64;
    Para:array [1..100000000] of boolean;
    High:array [2..200000000] of boolean;

begin
 ReadLn(N,K);
 for i:=1 to N do
  Para[i]:=True;
 for i:=1 to K do
 begin
  Read(a);
  Para[a]:=False;
 end;
 a:=0;
 for i:=2 to 2* N do
  High[i]:=False;
 for i:=1 to N do
  for j:=1 to N do
   if (Para[i]=True) and (Para[j]=True) then
    if High[i+j]=False then
     begin
      a:=a+1;
      High[i+j]:=True;
     end;
    Write(a);
    ReadLn;
end.