a, b = map(int, input().split()) if a==b: c = (a**2 + b**2)**0.5 else: c = abs(a**2 - b**2)**0.5 print(c)