#include #include #include using namespace std; int main(){ int a,b; cin >> a >> b; double ans = 0; /* a^2 + b^2 = c^2 -> sqrt(a^2+b^2) a^2 + c^2 = b^2 -> sqrt(b^2-a^2) b^2 + c^2 = a^2 -> sqrt(a^2-b^2) */ //ans = sqrt(a*a+b*b); if(b*b-a*a > 0){ ans = (double)sqrt(b*b-a*a); }else if(a*a-b*b > 0){ ans = (double)sqrt(a*a-b*b); } cout << fixed << setprecision(7) << ans << endl; return 0; }