import math a = input() a = a.split(" ") a = [int(i) for i in a] length = math.sqrt(abs(a[0]**2-a[1]**2)) if a[0]==a[1]: length = math.sqrt(abs(a[0]**2+a[1]**2)) print(length)