#include "bits/stdc++.h" using namespace std; int main() { double A, B; cin >> A >> B; if (A == B) { printf("%.9f\n", (double)A * sqrt(2.0)); return 0; } if (A > B) swap(A, B); printf("%.9f\n", sqrt(B * B - A * A)); }