a,b = gets.split.map(&:to_i).sort if a == b puts Math.sqrt(a * a + b * b) else puts Math.sqrt(b * b - a * a) end