#include #include using namespace std; int main() { //freopen("triangle.in","r",stdin); //freopen("triangle.out","w",stdout); int a,b; scanf("%d %d",&a,&b); if(a==b) printf("%.8lf",sqrt(2*a)); else printf("%.8lf",sqrt(abs(a*a-b*b))); return 0; }