import math a, b = sorted(map(int, input().split())) if a == b: c = math.hypot(a, b) else: c = math.sqrt(b * b - a * a) print(c)