Program ubhuiwrhg;
var k : integer;
n, g, s, i, c : longint;
m : array [1..2000000000] of boolean;
f:boolean;
begin
c:=0;
f:=false;
read(n);
for i:=1 to n do m[i]:=true;
readln(k);
for g:= 1 to k do
begin
read(i);
m[i]:= false;
end;
for i:=2 to 2*n do
begin
for g:=1 to n do
begin
if m[g]=true then
begin
for s:=1 to n do
if (s+g=i) and (m[s]=true) and (f=false) then
begin
c:=c+1;
f:=true;
break;
end;
end;
if f=true then
break;
end;
f:=false;
end;
write(c);
end.
