type mas = array[1..2000] of longint;

var j,n,i,k,l,ans:longint;
m,res:mas;
begin
read(n);
read(k);
for i:=1 to n do
  begin
  m[i]:=1;
  end;
for i:=1 to n do
  begin
  res[i]:=0;
  end;
for i:=1 to k do
  begin
  read(l);
  m[l]:=0;
  end;
for i:=1 to n do
  begin
  for j:=i to n do
    begin
    if(m[i]<>0)and(m[j]<>0)
      then
      res[i+j]:=1;
    end;
  end;
ans:=0;
for i:=1 to 2*n do
  begin
  ans:=ans+res[i];
  end;
writeln(ans);
end.