var
i,j,n,k,s,x,h: integer;
a,b,c,d:array [1..1000] of integer;
begin
readln(n,k);
   for i:=1 to k do read(b[i]);
   for i:=1 to n do a[i]:=i;
x:=n div 2;
for i:=1 to n do
for j:=1 to k do
if b[j]=a[i] then a[i]:=0;
for i:=1 to n do
for j:=1 to n do
begin
x:=i*n;
if (a[i]<>0) and (a[j]<>0) then c[j+x]:=a[i]+a[j] else c[j+x]:=0;
end;
s:=0;
for i:=n+1 to n*(n+1) do if (c[i]<>0) then begin s:=s+1;  d[s]:=c[i];   end;
for i:=1 to s-1 do
begin
x:=d[i];
for j:=i+1 to s do
if d[j]=x then d[j]:=0;
end;
h:=0;
for i:=1 to s do if (d[i]<>0) then h:=h+1;
writeln(h);
readln;
end.