import math a = [int(i) for i in input().split()] if a[0] == a[1]: ans = a[0]*math.sqrt(2) print(ans) else: sya,n = max(a),min(a) ans = pow(sya,2) - pow(n,2) print(math.sqrt(ans))