#include #include #include #include int main() { int a, b, x, y; std::cin >> a; std::cin >> b; std::cin >> x; std::cin >> y; double max_wa = a > b ? a : b, min_wa = a > b ? b : a; double max_eki = x > y ? x : y, min_eki = x > y ? y : x; if(max_eki * min_wa / max_wa > min_eki) { std::cout << min_eki + min_eki * max_wa / min_wa << std::endl; } else { std::cout << std::setprecision(12) << max_eki + max_eki * min_wa / max_wa << std::endl; } }