program Coop;

var
  n,k,i,j,y,z,x,d,f,r : integer;
  a : array[1..20000] of integer;
  b : array[1..20000,1..20000] of integer;
  t : boolean;

begin
  read(n,k);
  for i:=1 to n do
    a[i]:=i;
  for i:=1 to k do
    begin
      read(z);
      a[z]:=0;
    end;
  i:=1;
  j:=1;
  while i<=n do
    begin
      while j<=n do
      begin
        if (a[i]<>0) and (a[j]<>0) then
          b[i,j]:=i+j
        else
          b[i,j]:=0;
        j:=j+1;
      end;
      i:=i+1;
      j:=i;
    end;
  r:=0;
  i:=1;
  j:=1;
  while i<=n do
    begin
      while j<=n do
        begin
          if b[i,j]<>0 then
            begin
              if r>0 then
                begin
                  t:=true;
                  if (i>1) and (j>1) then
                    if (b[i,j]=b[(i-1),j]) or (b[i,j]=b[i,(j-1)]) then
                      t:= false;
                  for x:=1 to (i-1) do
                    for y:=1 to (j-1) do
                      if b[i,j]=b[x,y] then
                        t:= false;
                  if t then 
                    r:= r+1;
                end
              else
                r:=1;
            end;
          j:=j+1;
        end;
      i:=i+1;
      j:=i;
    end;
  writeln(r);
end.
        