#include double sqrt(double x) { double min, mid, max; int i; min = 0; max = 1; while (max * max <= x) max *= 2; for (i = 0; i < 100; i++) { mid = (max + min) / 2; if (mid * mid > x) max = mid; else min = mid; } return min; } int main() { int a, b; scanf("%d %d", &a, &b); if (a < b) printf("%.20lf\n", sqrt((double)(b * b - a * a))); else if (a > b) printf("%.20lf\n", sqrt((double)(a * a - b * b))); else printf("%.20lf\n", a * sqrt(2.0)); return 0; }