Program spell;
Var a,b,c,d,s1,s2,s3:integer;
Begin
 readln(a,b,c,d);
 s1:=a * b + c * d;
 s2:=a * c + b * d;
 s3:=b * c + a * d;
 if (s1 > s2) then
               if (s2 < s3) then write(s1)
                            else
                             if (s1 > s3) then write(s1)
                                          else write(s2)
              else
               if (s1 > s3) then write(s2)
                            else
                             if (s3 > s2) then write(s3)
                                          else write(s2);
 readln;
End.