A, B = map(int, input().split())
A, B = min(A, B), max(A, B)
if A == B:
    print((A ** 2 + B ** 2) ** 0.5)
else:
    print((B ** 2 - A ** 2) ** 0.5)