program func_ifx_theny;
var
z,y:integer;
begin
read(z);
if z<-3 then
y:=z
else if z<=0 then
y:=z-3
else
y:=8*z+sqr(z);
write(y)
end.
program func_ifx_theny;
var
z,y:integer;
begin
read(z);
if z<-3 then
y:=z
else if z<=0 then
y:=z-3
else
y:=8*z+sqr(z);
write(y)
end.