//1
var
a, b: real;
begin
write('a = '); readln(a);
write('b = '); readln(b);
writeln((a*a*a + b*b*b) / 2)
end.
//2
var a, b, c, f: real;
begin
write('a = '); readln(a);
write('b = '); readln(b);
write('c = '); readln(c);
f := ((b + sqrt(b*b+4*a*c))/(2*a))-(a*a*a)*c+b;
writeln(f);
end.