program z;
var x,y:real;
begin
readln(x);
y:=x*x-6*x-1;
writeln(y);
end.