a,b = map(int,input().split()) import math if a > b: c = math.sqrt(a**2 - b**2) elif a < b: c = math.sqrt(b**2 - a**2) elif a == b: c = math.sqrt(a**2 + b**2) print(c)