a, b = map(int, input().split()) if a == b: print(a*2**.5) else: if a > b: a, b = b, a print((b*b-a*a)**.5)