import math a, b = map(int,input().split()) x_1 = math.sqrt(a**2 + b**2) if a - b >= 0: x_2 = math.sqrt(a**2 - b**2) else: x_2 = math.sqrt(b**2 - a**2) if x_1 - x_2 <= 0: print(x_1) else: print(x_2)