from math import sqrt


a,b=map(int,input().split())
if a>b:
    print(sqrt(a**2-b**2))

elif a<b:
    print(sqrt(b**2-a**2))

else:
    print(sqrt(a**2+b**2))