from collections import * from itertools import * from functools import * from heapq import * import sys,math input = sys.stdin.readline a,b = map(int,input().split()) a,b = min(a,b),max(a,b) if a==b: print(math.sqrt(a**2+b**2)) else: print(math.sqrt(b**2-a**2))