var
m,z,i:integer;
co:array[1..50]of boolean;
procedure pi(n:integer);
var i:integer; v:integer;
begin
v:=true;
for i:=1 to n do
begin
if co[i] then co[i]:=false
else co[i]:=true;
end;
z:=z+i;
inc(n);
for i:=1 to m do
begin
if co[i] then
begin
v:=false;
exit;
end;
end;
if v then writeln(z)
else
begin
if n=m then begin n:=1; pi(n) end
else pi(n+1);
end;
end;
begin
readln(m);
for i:=1 to m do co[i]:=true;
pi(1);
end.
m,z,i:integer;
co:array[1..50]of boolean;
procedure pi(n:integer);
var i:integer; v:integer;
begin
v:=true;
for i:=1 to n do
begin
if co[i] then co[i]:=false
else co[i]:=true;
end;
z:=z+i;
inc(n);
for i:=1 to m do
begin
if co[i] then
begin
v:=false;
exit;
end;
end;
if v then writeln(z)
else
begin
if n=m then begin n:=1; pi(n) end
else pi(n+1);
end;
end;
begin
readln(m);
for i:=1 to m do co[i]:=true;
pi(1);
end.