import math X,Z=map(int,input().split()) if not X==Z: print(math.sqrt(max(X,Z)**2-min(X,Z)**2)) else: print(math.sqrt(2)*X)