var x: real;
begin
readln(x);
writeln(2*x+5);
writeln(3*sqr(x)+x+7);
writeln(3*x+7);
writeln(2*sqr(x)+7+10);
end.
var x: real;
begin
readln(x);
writeln(2*x+5);
writeln(3*sqr(x)+x+7);
writeln(3*x+7);
writeln(2*sqr(x)+7+10);
end.