import math a,b = map(int,raw_input().split()) print math.sqrt(max(a,b)**2 - min(a,b)**2) if a != b else math.sqrt(a**2*2)