import math s = input().split() a = float(s[0]) b = float(s[1]) c1 = 0.0 c2 = 0.0 c1 = a * a + b * b c1 = math.sqrt(c1) if a != b: c2 = math.fabs(b * b - a * a) c2 = math.sqrt(c2) if c2 == 0.0: print(c1) else: print(min(c1,c2))