#include using namespace std; double a, b; int main() { cin >> a >> b; if(a < b) swap(a, b); cout << fixed << setprecision(15) << sqrt(a * a + b * b * (a == b ? 1 : -1)) << endl; return 0; }