from math import sqrt a, b = map(int, input().split()) if a == b: print(a * sqrt(2)) else: print(sqrt(max(a, b)**2 - min(a, b)**2))