var n, k, i, j, t, sum : longint;
    a:array [1..200000] of boolean;
begin
   fillchar (a,sizeof (a), 1);
   readln (n,k);
   for i:=1 to k do
    begin
      read (t);
      a[t]:=false;
    end;
   sum := 0;

   for i:=2 to n * 2 do
     begin
       for j:=1 to i div 2 do
         if (a[j] and (i - j <= n) and a[i - j])
         then
           begin
             inc (sum);
             break;
           end;
     end;
   write(sum);
end.
