var y,x:real;
begin
readln(x);
y:=2*(1-x*x+2.5*x*x*x+x*x*x*x);
writeln(x);
end.
var x,y,z:real;
y:=-x*x;
z:=y*x;
z:=2.5*z;
y:=y+z;
z:=z*x;
y:=y+1;
y:=y*2;
writeln(y);
var y,x:real;
begin
readln(x);
y:=2*(1-x*x+2.5*x*x*x+x*x*x*x);
writeln(x);
end.
var x,y,z:real;
begin
readln(x);
y:=-x*x;
z:=y*x;
z:=2.5*z;
y:=y+z;
z:=z*x;
y:=y+z;
y:=y+1;
y:=y*2;
writeln(y);
end.