var a,m,n,k:real; begin readln(m,n,k); if (m+n+k)<(m*n*k) then a:=m+n+k else a:=m*n*k; writeln(a); end.