#include using namespace std; int main(void) { cin.tie(0); ios::sync_with_stdio(false); int a,b; cin >> a >> b; int A = min(a,b); int B = max(a,b); double c = sqrt(B*B - A*A); double d = sqrt(B*B + A*A); cout << fixed; cout.precision(16); if(a==b) { cout << d << '\n'; } else { cout << c << '\n'; } return 0; }