#include #include int main(void) { int a, b; double c1, c2; scanf("%d%d", &a, &b); if(a == b){ printf("%f\n", sqrt(a * a + b * b)); } else { c1 = sqrt(a * a + b * b); c2 = sqrt(abs(a * a - b * b)); printf("%f\n", (c1 < c2) ? c1 : c2); } return 0; }