#include #include #include using namespace std; vector < int > a; int i, x; int main() { for(i = 1; i <= 4; i++) { cin >> x; a.push_back(x); } sort(a.begin(), a.end()); cout<< a[3] * a[2] + a[1] * a[0]; return 0; }