import math a,b = map(float, raw_input().split()) if a == b: print math.sqrt(a*a+b*b) else: x = min(a,b) y = max(a,b) print math.sqrt(y*y-x*x)