var a,b,c,sum,proiz:integer;
begin
readln (a,b,c);
sum:=a+b+c;
proiz:=a*b*c;
if (sum<proiz) then writeln (sum)
else
writeln (proiz);
readln;
end.
var a,b,c,sum,proiz:integer;
begin
readln (a,b,c);
sum:=a+b+c;
proiz:=a*b*c;
if (sum<proiz) then writeln (sum)
else
writeln (proiz);
readln;
end.