var x,y,z,res,a,b: real;
begin
write('Vvedite x = ');
readln(x);
write('Vvedite y = ');
readln(y);
write('Vvedite z = ');
readln(z);
a := x + y + z / 2;
b := x * y * z;
if (a < b) then res := a * a + 1;
else res := b * b + 1;
writeln(res);
end.
var x,y,z,res,a,b: real;
begin
write('Vvedite x = ');
readln(x);
write('Vvedite y = ');
readln(y);
write('Vvedite z = ');
readln(z);
a := x + y + z / 2;
b := x * y * z;
if (a < b) then res := a * a + 1;
else res := b * b + 1;
writeln(res);
end.