function F(x:real):real;beginF:=9*sqr(x)-(sqr(x))/(x-1);end;
{var x:real;beginreadln(x);writeln(F(x));end.}
function F(x:real):real;
begin
F:=9*sqr(x)-(sqr(x))/(x-1);
end;
{var x:real;
begin
readln(x);
writeln(F(x));
end.}