A, B = sorted(map(int, input().split())) print((B ** 2 + A ** 2) ** .5 if A == B else (B ** 2 - A ** 2) ** .5)