var n,m,a,b:int64;
function find_tri(x:longint):int64;
var t:int64;
begin
if x=3 then exit(1);
x:=x-3;
if x mod 2=0 then begin t:=x div 2;exit(t*(x-1)+1);end;
if (x-1) mod 2=0 then begin t:=(x-1) div 2;exit(t*x+1);end;
end;
begin
assign(input,'tria.in');
assign(output,'tria.out');
reset(input);
rewrite(output);
read(n,m);
a:=find_tri(n);
if n mod 2=0 then begin b:=n div 2;b:=b*(n-1);end;
if ((n-1)mod 2=0) then begin b:=(n-1)div 2;b:=b*n;end;
write(a+b);
close(input);
close(output);
end.